Skip to content

Commit

Permalink
Merge pull request #288 from ava-labs/app-relayer-worker
Browse files Browse the repository at this point in the history
Process messages concurrently
  • Loading branch information
cam-schultz authored Jun 4, 2024
2 parents ffa7bcf + 7d2f8ee commit b3c24b2
Show file tree
Hide file tree
Showing 42 changed files with 2,908 additions and 960 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout awm-relayer repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set Go version
run: |
Expand All @@ -45,6 +47,8 @@ jobs:

- name: Checkout awm-relayer repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Run E2E Tests
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/data ./scripts/e2e_test.sh
2 changes: 2 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set Go version
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
fetch-depth: 0
path: awm-relayer
submodules: recursive

- name: Set Go version
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
path: awm-relayer
submodules: recursive

- name: Run Snyk
uses: snyk/actions/golang@master
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout awm-relayer repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set Go version
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ relayer-config.json
main.log
server.log
*.test

# Foundry outputs
cache/
out/
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "tests/contracts/lib/teleporter"]
path = tests/contracts/lib/teleporter
url = https://github.com/ava-labs/teleporter
[submodule "tests/contracts/lib/forge-std"]
path = tests/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
run:
timeout: 3m
tests: true
# skip auto-generated files.
skip-files:
- ".*mock.*"

issues:
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
# skip auto-generated files.
exclude-files:
- ".*mock.*"

linters:
disable-all: true
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ awm-relayer --version Display awm-relayer vers
awm-relayer --help Display awm-relayer usage and exit.
```

### Initialize the repository

- Get all submodules: `git submodule update --init --recursive`

### Building

Before building, be sure to install Go, which is required even if you're just building the Docker image.
Expand Down
4 changes: 2 additions & 2 deletions database/relayer_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ func CalculateRelayerID(
sourceBlockchainID ids.ID,
destinationBlockchainID ids.ID,
originSenderAddress common.Address,
desinationAddress common.Address,
destinationAddress common.Address,
) common.Hash {
return crypto.Keccak256Hash(
[]byte(strings.Join(
[]string{
sourceBlockchainID.String(),
destinationBlockchainID.String(),
originSenderAddress.String(),
desinationAddress.String(),
destinationAddress.String(),
},
"-",
)),
Expand Down
2 changes: 1 addition & 1 deletion database/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func CalculateStartingBlockHeight(
} else if err != nil {
// Otherwise, we've encountered an unknown database error
logger.Error(
"failed to get latest block from database",
"Failed to get latest block from database",
zap.String("relayerID", relayerID.ID.String()),
zap.Error(err),
)
Expand Down
Loading

0 comments on commit b3c24b2

Please sign in to comment.