Skip to content
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

Process messages concurrently #288

Merged
merged 62 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
51d4e6f
route incoming messages to appRelayer
cam-schultz Apr 29, 2024
608022c
Merge branch 'db-manager' into concurrent-messages
cam-schultz Apr 30, 2024
a1bdf87
todo comments
cam-schultz Apr 30, 2024
3b0c438
remove catch up results chan
cam-schultz Apr 30, 2024
4142101
Revert "remove catch up results chan"
cam-schultz Apr 30, 2024
01a07e3
write directly to headers chan
cam-schultz Apr 30, 2024
8cf64a6
Merge branch 'db-manager' into concurrent-messages
cam-schultz May 1, 2024
678fa92
send to channel before closing
cam-schultz May 2, 2024
e8371e3
relay messages async - wip
cam-schultz May 2, 2024
252b027
listener composed of app relayers
cam-schultz May 2, 2024
f386d11
appRelayer maintains block status
cam-schultz May 2, 2024
b5fca25
combine prepare and process height
cam-schultz May 3, 2024
34eda3f
refactor message manager and warpblockinfo
cam-schultz May 3, 2024
efa8f3b
restore integ tests
cam-schultz May 3, 2024
de411b9
combine prepare and process height
cam-schultz May 3, 2024
9f79ca1
refactor app relayer interface
cam-schultz May 3, 2024
7edff1d
noop if committed height is unchanged
cam-schultz May 10, 2024
2ee56bb
remove unused var
cam-schultz May 10, 2024
72f6f0c
fix unit tests
cam-schultz May 10, 2024
08235b7
Merge branch 'db-manager' into concurrent-messages
cam-schultz May 13, 2024
5ffa9dc
Merge branch 'concurrent-messages' into app-relayer-worker
cam-schultz May 13, 2024
90391a6
go 1.22.3
cam-schultz May 13, 2024
69dbc80
bump golangci-lint version
cam-schultz May 13, 2024
acbc62d
Merge branch 'db-manager' into concurrent-messages
cam-schultz May 14, 2024
23dd427
Merge branch 'concurrent-messages' into app-relayer-worker
cam-schultz May 14, 2024
b57d05d
add batch Teleporter message test
cam-schultz May 14, 2024
1a051f3
do not assume ordered message delivery
cam-schultz May 14, 2024
2db03ec
migrate deprecated flag
cam-schultz May 14, 2024
248c852
checkout submodules in ci
cam-schultz May 14, 2024
b5cd801
re-checkout repo
cam-schultz May 14, 2024
0930225
Merge branch 'main' into app-relayer-worker
cam-schultz May 14, 2024
4d0cd01
remove unused param
cam-schultz May 14, 2024
1cd196e
relay between subnets, no c-chain
cam-schultz May 14, 2024
7b345c6
debug logs
cam-schultz May 14, 2024
b3c5b5e
batch test requires all messages delivered
cam-schultz May 14, 2024
8dce7b4
comments+cleanup
cam-schultz May 15, 2024
359032d
Merge branch 'main' into app-relayer-worker
cam-schultz May 20, 2024
f1887c9
cleanup external handler
cam-schultz May 21, 2024
65a9162
request id mutual exclusion
cam-schultz May 21, 2024
ef461da
comments and cleanup
cam-schultz May 21, 2024
cbddf3a
rename MessageManager to MessageHandlerFactory
cam-schultz May 21, 2024
8653be1
lint
cam-schultz May 21, 2024
610105b
revert to go1.21
cam-schultz May 21, 2024
e939eca
add handleResponse helper
cam-schultz May 21, 2024
0611a3b
Update relayer/application_relayer.go
cam-schultz May 22, 2024
b920a0f
rename shadowed var
cam-schultz May 22, 2024
757f988
cleanup
cam-schultz May 22, 2024
359dde4
process blocks async
cam-schultz May 22, 2024
00a1d4e
app relayer holds a dst client
cam-schultz May 22, 2024
8ed636b
fix unit test
cam-schultz May 22, 2024
ad391aa
Merge branch 'app-relayer-worker' of github.com:ava-labs/awm-relayer …
cam-schultz May 22, 2024
d1936ec
handle app relayer errors
cam-schultz May 23, 2024
59210e0
add upgrade comment
cam-schultz May 23, 2024
f4f44e6
only lock nonce usage
cam-schultz May 23, 2024
9e55c91
Merge branch 'main' into app-relayer-worker
geoff-vball May 28, 2024
077cea1
Merge branch 'main' into app-relayer-worker
geoff-vball May 31, 2024
1782f31
Refactor application relayers
geoff-vball May 31, 2024
ba2f686
Fix typo
geoff-vball May 31, 2024
024ffd2
Merge pull request #309 from ava-labs/gstuart/concurrent-message
geoff-vball May 31, 2024
65b8ba8
Fix key truncation
geoff-vball May 31, 2024
3404bf7
lint
geoff-vball May 31, 2024
7d2f8ee
Merge branch 'main' into app-relayer-worker
geoff-vball May 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest golangci-lint deprecates this option in favor of exclude-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