-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: add Teleportr service #2233
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
Merged
mslipper
merged 12 commits into
ethereum-optimism:develop
from
cfromknecht:teleportr-service
Mar 2, 2022
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6af67df
feat: move L2 dial logic out of bss-core
cfromknecht 59ff146
feat: use uint64 for deposit ids and block numbers
cfromknecht 8954254
feat: replace LastestDeposit with LastProcessedBlock
cfromknecht 8a24ce3
feat: add vim swap files to gitignore
cfromknecht 014976d
feat: add teleportr flags and config
cfromknecht d8780d8
feat: add teleportr binary and Makefile skeleton
cfromknecht 4077920
feat: add teleportr deposit + disburser bindings
cfromknecht 44d2dc9
feat: add FindFilterStartBlockNumber helper
cfromknecht 2ece217
feat: add PendingTx tracking to teleportr db
cfromknecht 11fe70a
feat: add success field to teleportr disbursement table
cfromknecht a800608
feat: add teleportr driver
cfromknecht 2910a3c
fix: teleportr CI env vars (round 2)
cfromknecht File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@eth-optimism/batch-submitter-service': patch | ||
| --- | ||
|
|
||
| Move L2 dial logic out of bss-core to avoid l2geth dependency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ packages/contracts/hardhat* | |
| packages/data-transport-layer/db | ||
|
|
||
| # vim | ||
| *.swp | ||
| *.sw* | ||
|
|
||
| .env | ||
| .env* | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
go/bss-core/dial/l2_client.go → go/batch-submitter/dial_l2_client.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /teleportr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| GITCOMMIT := $(shell git rev-parse HEAD) | ||
| GITDATE := $(shell git show -s --format='%ct') | ||
| GITVERSION := $(shell cat package.json | jq .version) | ||
|
|
||
| LDFLAGSSTRING +=-X main.GitCommit=$(GITCOMMIT) | ||
| LDFLAGSSTRING +=-X main.GitDate=$(GITDATE) | ||
| LDFLAGSSTRING +=-X main.GitVersion=$(GITVERSION) | ||
| LDFLAGS := -ldflags "$(LDFLAGSSTRING)" | ||
|
|
||
| DEPOSIT_ARTIFACT := ../../packages/contracts/artifacts/contracts/L1/teleportr/TeleportrDeposit.sol/TeleportrDeposit.json | ||
| DISBURSER_ARTIFACT := ../../packages/contracts/artifacts/contracts/L2/teleportr/TeleportrDisburser.sol/TeleportrDisburser.json | ||
|
|
||
| teleportr: | ||
| env GO111MODULE=on go build -v $(LDFLAGS) ./cmd/teleportr | ||
|
|
||
| clean: | ||
| rm teleportr | ||
|
|
||
| test: | ||
| go test -v ./... | ||
|
|
||
| lint: | ||
| golangci-lint run ./... | ||
|
|
||
| bindings: bindings-deposit bindings-disburser | ||
|
|
||
| bindings-deposit: | ||
| $(eval temp := $(shell mktemp)) | ||
| cat $(DEPOSIT_ARTIFACT) | jq -r .bytecode > $(temp) | ||
| cat $(DEPOSIT_ARTIFACT) | jq .abi | \ | ||
| abigen \ | ||
| --pkg deposit \ | ||
| --abi - \ | ||
| --out bindings/deposit/teleportr_deposit.go \ | ||
| --type TeleportrDeposit \ | ||
| --bin $(temp) | ||
|
|
||
| bindings-disburser: | ||
| $(eval temp := $(shell mktemp)) | ||
| cat $(DISBURSER_ARTIFACT) | jq -r .bytecode > $(temp) | ||
| cat $(DISBURSER_ARTIFACT) | jq .abi | \ | ||
| abigen \ | ||
| --pkg disburse \ | ||
| --abi - \ | ||
| --out bindings/disburse/teleportr_disburser.go \ | ||
| --type TeleportrDisburser \ | ||
| --bin $(temp) | ||
|
|
||
| .PHONY: \ | ||
| teleportr \ | ||
| bindings \ | ||
| bindings-deposit \ | ||
| bindings-disburser \ | ||
| clean \ | ||
| test \ | ||
| lint |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 there any reason as to why we are using the
l2gethdeps here? I feel like we could use the upstream stuff for things like rpc or utils, especially now that the http2 fix is in: 6f2ea19There 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.
yes, upstream doesn't expose the L2 metadata https://github.com/ethereum-optimism/optimism/blob/develop/go/batch-submitter/drivers/sequencer/batch.go#L53L54
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.
fwiw we do use upstream for L2 in this driver since we don't need to access any non-standard info