-
Notifications
You must be signed in to change notification settings - Fork 4
beholder: register data-feeds and chain-capabilities schemas #378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: register-chain-capabilities-schemas | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - ".github/workflows/register-chain-capabilities-schemas.yaml" | ||
| - "chain-capabilities/**/*.proto" | ||
| - "chain-capabilities/chip-schemas.json" | ||
| - "chain-capabilities/beholder-schemas.json" | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/register-chain-capabilities-schemas.yaml" | ||
| - "chain-capabilities/**/*.proto" | ||
| - "chain-capabilities/chip-schemas.json" | ||
| - "chain-capabilities/beholder-schemas.json" | ||
|
|
||
| jobs: | ||
| register-schemas: | ||
| runs-on: ubuntu-latest | ||
| environment: publish | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: | ||
| - { name: chain-capabilities, file: chip-schemas.json } | ||
| - { name: beholder, file: beholder-schemas.json } | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
|
Check warning on line 39 in .github/workflows/register-chain-capabilities-schemas.yaml
|
||
| with: | ||
| mask-aws-account-id: true | ||
| role-to-assume: ${{ secrets.AWS_IAM_ROLE_PUBLISH_ARN }} | ||
| aws-region: ${{ secrets.AWS_REGION }} | ||
|
|
||
| - name: Register Chain Capabilities Schemas for ${{ matrix.config.name }} domain | ||
| uses: smartcontractkit/.github/actions/chip-schema-registration@b1bec0ae729606681897cbf7fad5d7c1d572173e # v1.1.0 | ||
| with: | ||
| aws-account-id: ${{ secrets.AWS_ACCOUNT_ID_ROOT }} | ||
| aws-region: us-west-2 | ||
| chip-schema-dir: "chain-capabilities" | ||
| chip-config-file-path: "chain-capabilities/${{ matrix.config.file }}" | ||
| chip-config-host: ${{ github.ref_name == 'main' && secrets.chip_config_host_prod || secrets.chip_config_host_staging }} | ||
| chip-config-user: ${{ secrets.chip_config_user }} | ||
| chip-config-password: ${{ github.ref_name == 'main' && secrets.chip_config_password_prod || secrets.chip_config_password_staging }} | ||
| ts-ouath-client-id: ${{ secrets.chip_config_ts_oauth_client_id }} | ||
| ts-ouath-secret: ${{ secrets.chip_config_ts_oauth_secret }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "domain": "beholder__chain_capabilities__messages", | ||
| "schemas": [ | ||
| { | ||
| "entity": "WriteReportInitiated", | ||
| "path": "evm/monitoring/write_report.proto", | ||
| "references": [ | ||
| { | ||
| "name": "libs/monitoring/execution_context.proto", | ||
| "entity": "monitoring.ExecutionContext", | ||
| "path": "libs/monitoring/execution_context.proto" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "entity": "WriteReportSuccess", | ||
| "path": "evm/monitoring/write_report.proto", | ||
| "references": [ | ||
| { | ||
| "name": "libs/monitoring/execution_context.proto", | ||
| "entity": "monitoring.ExecutionContext", | ||
| "path": "libs/monitoring/execution_context.proto" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "entity": "WriteReportError", | ||
| "path": "evm/monitoring/write_report.proto", | ||
| "references": [ | ||
| { | ||
| "name": "libs/monitoring/execution_context.proto", | ||
| "entity": "monitoring.ExecutionContext", | ||
| "path": "libs/monitoring/execution_context.proto" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "domain": "chain-capabilities", | ||
| "schemas": [ | ||
| { | ||
| "entity": "WriteReportInitiated", | ||
| "path": "evm/monitoring/write_report.proto", | ||
| "references": [ | ||
| { | ||
| "name": "libs/monitoring/execution_context.proto", | ||
| "entity": "monitoring.ExecutionContext", | ||
| "path": "libs/monitoring/execution_context.proto" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "entity": "WriteReportSuccess", | ||
| "path": "evm/monitoring/write_report.proto", | ||
| "references": [ | ||
| { | ||
| "name": "libs/monitoring/execution_context.proto", | ||
| "entity": "monitoring.ExecutionContext", | ||
| "path": "libs/monitoring/execution_context.proto" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "entity": "WriteReportError", | ||
| "path": "evm/monitoring/write_report.proto", | ||
| "references": [ | ||
| { | ||
| "name": "libs/monitoring/execution_context.proto", | ||
| "entity": "monitoring.ExecutionContext", | ||
| "path": "libs/monitoring/execution_context.proto" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copied from https://github.com/smartcontractkit/capabilities/blob/main/chain_capabilities/evm/monitoring/write_report.proto | ||
| syntax = "proto3"; | ||
|
|
||
| package chain_capabilities.evm; | ||
|
Check failure on line 4 in chain-capabilities/evm/monitoring/write_report.proto
|
||
|
|
||
| option go_package = "github.com/smartcontractkit/chainlink-protos/chain-capabilities/evm/monitoring"; | ||
|
|
||
| import "libs/monitoring/execution_context.proto"; | ||
|
|
||
| message WriteReportInitiated { | ||
| WriteReportRequest req = 1; | ||
| monitoring.ExecutionContext execution_context = 20; | ||
| } | ||
|
|
||
| message WriteReportSuccess { | ||
| WriteReportRequest req = 1; | ||
| int32 log_count = 2; | ||
| monitoring.ExecutionContext execution_context = 20; | ||
| } | ||
|
|
||
| message WriteReportError { | ||
| WriteReportRequest req = 1; | ||
| string summary = 2; | ||
| string cause = 3; | ||
| monitoring.ExecutionContext execution_context = 20; | ||
| } | ||
|
|
||
| message WriteReportTxFeeCalculationError { | ||
| WriteReportRequest req = 1; | ||
| string summary = 2; | ||
| string cause = 3; | ||
| string tx_idempotency_key = 4; | ||
| monitoring.ExecutionContext execution_context = 20; | ||
| } | ||
|
|
||
| message WriteReportRequest { | ||
| bytes receiver = 1; | ||
| ReportResponse report = 2; | ||
| optional GasConfig gas_config = 3; | ||
| } | ||
|
|
||
| message GasConfig { | ||
| uint64 gas_limit = 1; | ||
| } | ||
|
|
||
| message ReportResponse { | ||
| bytes config_digest = 1; | ||
| uint64 seq_nr = 2; | ||
| bytes report_context = 3; // combination of seq_nr and config_digest | ||
| bytes raw_report = 4; | ||
| repeated AttributedSignature sigs = 5; | ||
| } | ||
|
|
||
| message AttributedSignature { | ||
| bytes signature = 1; | ||
| uint32 signer_id = 2; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Copied from https://github.com/smartcontractkit/capabilities/blob/main/libs/monitoring/execution_context.proto | ||
| syntax = "proto3"; | ||
|
|
||
| package monitoring; | ||
|
Check failure on line 4 in chain-capabilities/libs/monitoring/execution_context.proto
|
||
|
|
||
| option go_package = "github.com/smartcontractkit/chainlink-protos/chain-capabilities/libs/monitoring"; | ||
|
|
||
| // [Execution Context] | ||
| message ExecutionContext { | ||
| // Execution Context - Source | ||
| string meta_source_id = 1; | ||
|
|
||
| // Execution Context - Chain | ||
| string meta_chain_family_name = 2; | ||
| string meta_chain_id = 3; | ||
| string meta_network_name = 4; | ||
| string meta_network_name_full = 5; | ||
|
|
||
| // Execution Context - Workflow (capabilities.RequestMetadata) | ||
| string meta_workflow_id = 6; | ||
| string meta_workflow_owner = 7; | ||
| string meta_workflow_execution_id = 8; | ||
| string meta_workflow_name = 9; | ||
| uint32 meta_workflow_don_id = 10; | ||
| uint32 meta_workflow_don_config_version = 11; | ||
| string meta_reference_id = 12; | ||
|
|
||
| // Execution Context - Capability | ||
| string meta_capability_type = 13; | ||
| string meta_capability_id = 14; | ||
| uint64 meta_capability_timestamp_start = 15; | ||
| uint64 meta_capability_timestamp_emit = 16; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "domain": "beholder__data_feeds__messages", | ||
| "schemas": [ | ||
| { | ||
| "entity": "data_feeds.on_chain.registry.FeedUpdated", | ||
| "path": "on_chain/registry/feed_updated.proto" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| // Copied from https://github.com/smartcontractkit/atlas/blob/main/schemas/atlas/proto/beholder/data-feeds/feed_updated.proto | ||
| syntax = "proto3"; | ||
|
|
||
| package data_feeds.on_chain.registry; | ||
|
|
||
| option go_package = "github.com/smartcontractkit/chainlink-protos/data-feeds/on_chain/registry"; | ||
|
|
||
| // The on-chain FeedUpdated event which is extracted from the tx/event data or | ||
| // the write-target WriteConfirmed event, after a write was confirmed (@see message: write-target.WriteConfirmed). | ||
| message FeedUpdated { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| // Event data | ||
| string feed_id = 1; // bytes as hex string for readability | ||
| uint32 observations_timestamp = 2; | ||
| bytes benchmark = 3; | ||
| bytes report = 4; | ||
|
|
||
| // Notice: benchmark_val is the benchmark i192 on-chain value decoded as an double (float64), scaled by number of decimals (e.g., 1e-18) | ||
| // This is the largest type Prometheus supports, and this conversion can overflow but so far was sufficient | ||
| // for most use-cases. For big numbers, benchmark bytes should be used instead. | ||
| // | ||
| // Set as `math.NaN()` if report data type not a number, or `+/-Inf` if number doesn't fit in double. | ||
| double benchmark_val = 5; | ||
|
|
||
| // Head data - when was the event produced on-chain | ||
| string block_hash = 6; | ||
| string block_height = 7; | ||
| uint64 block_timestamp = 8; | ||
|
|
||
| // Transaction data - info about the tx that mained the event (optional) | ||
| string tx_id = 10; // TXM ref | ||
| string tx_hash = 11; | ||
| string tx_sender = 12; | ||
| string tx_receiver = 13; | ||
| string tx_status = 14; | ||
|
|
||
| // [Execution Context] | ||
| // TODO: replace with a proto reference once supported | ||
| // Execution Context - Source | ||
| string meta_source_id = 20; | ||
|
|
||
| // Execution Context - Chain | ||
| string meta_chain_family_name = 21; | ||
| string meta_chain_id = 22; | ||
| string meta_network_name = 23; | ||
| string meta_network_name_full = 24; | ||
|
|
||
| // Execution Context - Workflow (capabilities.RequestMetadata) | ||
| string meta_workflow_id = 25; | ||
| string meta_workflow_owner = 26; | ||
| string meta_workflow_execution_id = 27; | ||
| string meta_workflow_name = 28; | ||
| uint32 meta_workflow_don_id = 29; | ||
| uint32 meta_workflow_don_config_version = 30; | ||
| string meta_reference_id = 31; | ||
|
|
||
| // Execution Context - Capability | ||
| string meta_capability_type = 32; | ||
| string meta_capability_id = 33; | ||
| uint64 meta_capability_timestamp_start = 34; | ||
| uint64 meta_capability_timestamp_emit = 35; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proto originates here
https://github.com/smartcontractkit/capabilities/blame/4ef43191e53cfede6a854e6ddb24758066940004/libs/monitoring/execution_context.proto#L6