-
Notifications
You must be signed in to change notification settings - Fork 23
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
ShouldSendMessage
decider
#344
Changes from all commits
1b161e6
5c6422e
584556e
562cf7c
b01b14b
0d6b07b
249de65
81b30bc
ed3f4e7
f897c89
f89bd35
3631b7b
be38f17
aab66d5
df26aa2
a9c374c
6a9c276
c37fd41
7eb5112
598f9bb
7e02e1a
0a22497
742a6ee
1837d4b
8ed8112
6488c81
9a7944d
19e8689
682fead
79c82b2
c4b2262
f8662fd
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 |
---|---|---|
|
@@ -27,5 +27,15 @@ jobs: | |
with: | ||
go-version-file: 'go.mod' | ||
|
||
- name: Install buf | ||
uses: bufbuild/buf-setup-action@v1.31.0 | ||
|
||
- name: Run Lint | ||
run: ./scripts/lint.sh --go-lint | ||
|
||
- name: Ensure protobuf changes are checked in | ||
run: | | ||
scripts/protobuf_codegen.sh | ||
git update-index --really-refresh >> /dev/null | ||
git diff-index HEAD # to show the differences | ||
git diff-index --quiet HEAD || (echo 'protobuf generated code changes have not all been checked in' && exit 1) | ||
Comment on lines
+39
to
+41
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. What's the difference between this method of checking that generated files are checked in versus the one we use in 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. not sure to be honest. I pulled this method from https://github.com/ava-labs/avalanchego/blob/49299868db0bdf5b3755c58993cc728173b3eedd/.github/workflows/check-clean-branch.sh#L8-L9 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
build/ | ||
__debug_bin | ||
tests/cmd/decider/decider | ||
|
||
.vscode* | ||
|
||
|
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. Let's add descriptions of the new config options. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ awm-relayer --help Display awm-relayer usag | |
|
||
### Building | ||
|
||
Before building, be sure to install Go, which is required even if you're just building the Docker image. | ||
Before building, be sure to install Go, which is required even if you're just building the Docker image. You'll also need to install [buf](github.com/bufbuild/buf/). | ||
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. Is 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. In order to build, yes, because the relayer binary is built to be aware of the protobuf interfaces so that that same binary can be used later if you decide you do want to include those config options. |
||
|
||
Build the relayer by running the script: | ||
|
||
|
@@ -291,6 +291,10 @@ The relayer is configured via a JSON file, the path to which is passed in via th | |
|
||
- The AWS region in which the KMS key is located. Required if `kms-key-id` is provided. | ||
|
||
`"decider-url": string` | ||
|
||
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. It's a bit odd that there's no description for 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. I got rid of |
||
- The URL of a service implementing the gRPC service defined by `proto/decider`, which will be queried for each message to determine whether that message should be relayed. | ||
|
||
## Architecture | ||
|
||
### Components | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Protobuf linting and generation for this project is managed by | ||
[buf](https://github.com/bufbuild/buf). | ||
|
||
Please find installation instructions at | ||
[https://docs.buf.build/installation/](https://docs.buf.build/installation/). | ||
|
||
When changes are made to the proto definition, the generated source code can be updated by running | ||
`protobuf_codegen.sh` located in the `scripts/` directory of this repo. | ||
|
||
Introduction to `buf` | ||
[https://docs.buf.build/tour/introduction](https://docs.buf.build/tour/introduction) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: v1 | ||
plugins: | ||
- name: go | ||
out: pb | ||
opt: paths=source_relative | ||
- name: go-grpc | ||
out: pb | ||
opt: paths=source_relative |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: prometheus | ||
repository: client-model | ||
commit: e171c0b235c546d5a9a597c2961bd357 | ||
digest: shake256:7db3f73ac0f1dce71e70f304f318e9741e857fd78b7b42f0df7a3da353fbb2f387899da7b0a77ac9ee9565194510e39a913cdb9a8ab3c2ff4b8713428c795213 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1 | ||
name: buf.build/ava-labs/awm-relayer | ||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT | ||
except: | ||
- PACKAGE_VERSION_SUFFIX # versioned naming <service>.v1beta |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
|
||
package decider; | ||
|
||
option go_package = "github.com/ava-labs/awm-relayer/proto/pb/decider"; | ||
|
||
service DeciderService { | ||
rpc ShouldSendMessage(ShouldSendMessageRequest) returns (ShouldSendMessageResponse); | ||
} | ||
|
||
message ShouldSendMessageRequest { | ||
uint32 network_id = 1; | ||
bytes source_chain_id = 2; | ||
bytes payload = 3; | ||
bytes bytes_representation = 4; | ||
bytes id = 5; | ||
} | ||
|
||
message ShouldSendMessageResponse { | ||
bool should_send_message = 1; | ||
} |
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.
Is the github token necessary? Does the repo even have access to a gh token?
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.
Apparently not. I removed this in ed3f4e7 and everything still ran fine. I had just copied this from avalanchego. Thanks for noticing it.