Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c6b61ea1
Commit
c6b61ea1
authored
Jul 19, 2023
by
Hamdi Allam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix circleci & remove op-node/withdrawal deps that also brings in op-e2e
parent
def2dbdf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
19 deletions
+22
-19
config.yml
.circleci/config.yml
+0
-1
Dockerfile
indexer/Dockerfile
+15
-9
Makefile
indexer/Makefile
+0
-2
standard_bridge.go
indexer/services/l2/bridge/standard_bridge.go
+7
-7
No files found.
.circleci/config.yml
View file @
c6b61ea1
...
@@ -1374,7 +1374,6 @@ workflows:
...
@@ -1374,7 +1374,6 @@ workflows:
name
:
indexer-tests
name
:
indexer-tests
binary_name
:
indexer
binary_name
:
indexer
working_directory
:
indexer
working_directory
:
indexer
dependencies
:
op-bindings
-
go-lint-test-build
:
-
go-lint-test-build
:
name
:
op-heartbeat tests
name
:
op-heartbeat tests
binary_name
:
op-heartbeat
binary_name
:
op-heartbeat
...
...
indexer/Dockerfile
View file @
c6b61ea1
FROM
golang:1.19.0-alpine3.15
as builder
FROM
--platform=$BUILDPLATFORM golang:1.19.9-alpine3.16
as builder
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
COPY
./indexer /go/indexer
# build indexer with the shared go.mod & go.sum files
COPY
./.git /go/.git
COPY
./indexer /app/indexer
COPY
./indexer/go.mod /go/indexer/go.mod
COPY
./op-bindings /app/op-bindings
COPY
./indexer/go.sum /go/indexer/go.sum
COPY
./op-service /app/op-service
COPY
./go.mod /app/go.mod
COPY
./go.sum /app/go.sum
COPY
./.git /app/.git
WORKDIR
/go/indexer
WORKDIR
/app/indexer
RUN
make
FROM
alpine:3.15
RUN
go mod download
COPY
--from=builder /go/indexer/indexer /usr/local/bin
RUN
make indexer
FROM
alpine:3.16
COPY
--from=builder /app/indexer/indexer /usr/local/bin
CMD
["indexer"]
CMD
["indexer"]
indexer/Makefile
View file @
c6b61ea1
GITCOMMIT
:=
$(
shell
git rev-parse HEAD
)
GITCOMMIT
:=
$(
shell
git rev-parse HEAD
)
GITDATE
:=
$(
shell
git show
-s
--format
=
'%ct'
)
GITDATE
:=
$(
shell
git show
-s
--format
=
'%ct'
)
GITVERSION
:=
$(
shell
cat
package.json | jq .version
)
LDFLAGSSTRING
+=
-X
main.GitCommit
=
$(GITCOMMIT)
LDFLAGSSTRING
+=
-X
main.GitCommit
=
$(GITCOMMIT)
LDFLAGSSTRING
+=
-X
main.GitDate
=
$(GITDATE)
LDFLAGSSTRING
+=
-X
main.GitDate
=
$(GITDATE)
LDFLAGSSTRING
+=
-X
main.GitVersion
=
$(GITVERSION)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
indexer
:
indexer
:
...
...
indexer/services/l2/bridge/standard_bridge.go
View file @
c6b61ea1
...
@@ -5,7 +5,6 @@ import (
...
@@ -5,7 +5,6 @@ import (
"github.com/ethereum-optimism/optimism/indexer/db"
"github.com/ethereum-optimism/optimism/indexer/db"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-node/withdrawals"
"github.com/ethereum-optimism/optimism/op-service/backoff"
"github.com/ethereum-optimism/optimism/op-service/backoff"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/ethclient"
...
@@ -45,6 +44,11 @@ func (s *StandardBridge) GetWithdrawalsByBlockRange(ctx context.Context, start,
...
@@ -45,6 +44,11 @@ func (s *StandardBridge) GetWithdrawalsByBlockRange(ctx context.Context, start,
return
nil
,
err
return
nil
,
err
}
}
l2L1MpABI
,
err
:=
bindings
.
L2ToL1MessagePasserMetaData
.
GetAbi
()
if
err
!=
nil
{
return
nil
,
err
}
receipts
:=
make
(
map
[
common
.
Hash
]
*
types
.
Receipt
)
receipts
:=
make
(
map
[
common
.
Hash
]
*
types
.
Receipt
)
defer
iter
.
Close
()
defer
iter
.
Close
()
for
iter
.
Next
()
{
for
iter
.
Next
()
{
...
@@ -61,7 +65,7 @@ func (s *StandardBridge) GetWithdrawalsByBlockRange(ctx context.Context, start,
...
@@ -61,7 +65,7 @@ func (s *StandardBridge) GetWithdrawalsByBlockRange(ctx context.Context, start,
var
withdrawalInitiated
*
bindings
.
L2ToL1MessagePasserMessagePassed
var
withdrawalInitiated
*
bindings
.
L2ToL1MessagePasserMessagePassed
for
_
,
eLog
:=
range
receipt
.
Logs
{
for
_
,
eLog
:=
range
receipt
.
Logs
{
if
len
(
eLog
.
Topics
)
==
0
||
eLog
.
Topics
[
0
]
!=
withdrawals
.
MessagePassedTopic
{
if
len
(
eLog
.
Topics
)
==
0
||
eLog
.
Topics
[
0
]
!=
l2L1MpABI
.
Events
[
"MessagePassed"
]
.
ID
{
continue
continue
}
}
...
@@ -76,11 +80,7 @@ func (s *StandardBridge) GetWithdrawalsByBlockRange(ctx context.Context, start,
...
@@ -76,11 +80,7 @@ func (s *StandardBridge) GetWithdrawalsByBlockRange(ctx context.Context, start,
}
}
}
}
hash
,
err
:=
withdrawals
.
WithdrawalHash
(
withdrawalInitiated
)
hash
:=
common
.
Hash
(
withdrawalInitiated
.
WithdrawalHash
)
if
err
!=
nil
{
return
nil
,
err
}
withdrawalsByBlockhash
[
ev
.
Raw
.
BlockHash
]
=
append
(
withdrawalsByBlockhash
[
ev
.
Raw
.
BlockHash
]
=
append
(
withdrawalsByBlockhash
[
ev
.
Raw
.
BlockHash
],
db
.
Withdrawal
{
withdrawalsByBlockhash
[
ev
.
Raw
.
BlockHash
],
db
.
Withdrawal
{
TxHash
:
ev
.
Raw
.
TxHash
,
TxHash
:
ev
.
Raw
.
TxHash
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment