-
Notifications
You must be signed in to change notification settings - Fork 39
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
Gauntlet fix offchain serialize #26
Conversation
bcac73c
to
1a3cc44
Compare
@@ -0,0 +1,45 @@ | |||
// Autogenerated from ocr2Proto.proto with Protobuf.toJSON() | |||
export const descriptor = { |
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.
Autogenerated descriptor with https://github.com/smartcontractkit/chainlink-solana/blob/8bb813d26e1ab55e54fbf6b938c33417685c86cd/gauntlet/packages/gauntlet-solana-contracts/src/core/proto/ocr2Proto.proto as source
JSON descriptor is still used as TS transpilation does not allow to include .proto
files, that will be needed for the binary
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.
Let's add a yarn
script that will do the auto-generation and write the descriptor to the file so there are no manual steps involved.
@@ -0,0 +1,37 @@ | |||
syntax="proto3"; |
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.
Where is this file from? It will also be required for the monitoring service AFAIK cc @topliceanu
Let's move this to the root e.g. ./proto/ocr2.proto
and then both use the same source.
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.
From libocr. Monitoring uses the same, but does not include: https://github.com/smartcontractkit/chainlink-solana/pull/26/files#diff-832dbc2305017d852ec2b4160c3b9d4f18443f44fd1696e6d8dced401c949722R31
which gauntlet needs
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.
Yeah, let's just move it to root and monitoring can use directly while Gauntlet derives/generates the ts
descriptors by using the local script.
@@ -0,0 +1,45 @@ | |||
// Autogenerated from ocr2Proto.proto with Protobuf.toJSON() |
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.
Let's rename the file as ocr2.proto.ts
and move it from ./core
as these are contracts/ocr2 specific, not part of core lib.
* proto encoding with Proto description * Proto descriptor as JSON object
Old JSON descriptor was generating a different result than libocr. Now is autogenerated from the
.proto
description