Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
73008bf
feat: preconf RPC service
May 15, 2025
4d30b6a
feat: preconf RPC service
May 15, 2025
4af7eab
chore: move opt-in bidder to new pkg
May 17, 2025
b5c7c62
fix: option to proxy from handler
May 17, 2025
249d6c3
fix: restructuring
May 17, 2025
eac7c63
feat: preconf RPC service
May 20, 2025
ec230b6
feat: preconf RPC service
May 20, 2025
7a431f1
feat: preconf RPC service
May 20, 2025
dbc1f04
feat: preconf RPC service
May 20, 2025
d36eaf8
feat: preconf RPC service
May 20, 2025
2f8895e
feat: preconf RPC service
May 20, 2025
575a09e
feat: preconf RPC service
May 20, 2025
8c4674d
feat: preconf RPC service
May 20, 2025
2a14924
feat: preconf RPC service
May 20, 2025
1959732
feat: preconf RPC service
May 20, 2025
670dd7d
feat: preconf RPC service
May 20, 2025
80931b4
fix: proxy request
May 30, 2025
2a2cba2
fix: temp
Jun 2, 2025
10f483f
feat: preconf rpc
Jun 2, 2025
606fc84
feat: preconf rpc
Jun 3, 2025
4be6fdb
feat: preconf RPC
Jun 6, 2025
d3fd9f7
feat: preconf RPC
Jun 9, 2025
bb13762
feat: preconf RPC
Jun 10, 2025
6ff5221
feat: preconf RPC
Jun 10, 2025
51e1e97
feat: preconf RPC
Jun 10, 2025
43152e6
feat: preconf RPC
Jun 11, 2025
e5e4f3f
fix: preconf RPC
Jun 11, 2025
e44265d
fix: preconf RPC
Jun 11, 2025
a9d8db0
feat: preconf RPC
Jun 12, 2025
0a595bd
feat: preconf RPC
Jun 12, 2025
83855ea
feat: preconf RPC
Jun 12, 2025
0aadda4
feat: preconf RPC
Jun 12, 2025
4f0f72f
fix: lint
Jun 12, 2025
2e3deed
fix: lint
Jun 12, 2025
6742447
fix: lint
Jun 12, 2025
25210ff
fix: lint
Jun 12, 2025
59a9700
fix: data dir
Jun 12, 2025
65f7c48
fix: profiles
Jun 12, 2025
892caf6
feat: preconf RPC
Jun 12, 2025
f433759
feat: preconf RPC
Jun 12, 2025
6407b29
feat: preconf RPC
Jun 12, 2025
8b77b5b
feat: preconf RPC
Jun 12, 2025
8c6849b
feat: preconf RPC
Jun 13, 2025
f1b8bec
feat: preconf RPC
Jun 13, 2025
95972f7
feat: preconf RPC
Jun 13, 2025
a038901
feat: preconf RPC
Jun 13, 2025
4838333
feat: preconf RPC
Jun 14, 2025
aa63e1d
feat: preconf RPC
Jun 14, 2025
c18bf99
fix: misc
Jun 14, 2025
7c6c11f
feat: preconf RPC
Jun 16, 2025
af38590
fix: misc
Jun 16, 2025
fc714ae
fix: tidy
Jun 16, 2025
8ab4e38
fix: debug contract deployer
Jun 16, 2025
423583d
fix: debug contract deployer
Jun 16, 2025
9c04c5c
fix: debug contract deployer
Jun 16, 2025
036277e
fix: restructure docker files
Jun 17, 2025
d9945d1
feat: preconf RPC
Jun 17, 2025
36edd8a
feat: add Makefile for docker build
Jun 17, 2025
6506d89
feat: test validator registry deployment
Jun 18, 2025
6022cee
feat: l1 rpc endpoint for test
Jun 19, 2025
f620194
fix: rebase issue
Jun 19, 2025
3e0d06d
fix: rebase issue
Jun 19, 2025
d997f9d
fix: test params
Jun 19, 2025
2edf0ab
fix: add some logs
Jun 19, 2025
36e98e6
fix: start blocktracker
Jun 19, 2025
7e11251
fix: getBlockByHash
Jun 20, 2025
f143231
fix: add new APIs
Jun 20, 2025
8d21234
fix: add new APIs
Jun 20, 2025
43e2304
fix: add new APIs
Jun 20, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- stressnet-wl1
- manual-test
- instant-bridge-test
- preconf-rpc-test
default: 'devnet'
all_targets:
description: 'All Arch & Os Targets'
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TAG ?= $(shell git describe --tags || git rev-parse --short HEAD)

.PHONY: docker
docker:
cd infrastructure/docker && TAG=$(TAG) docker buildx bake
16 changes: 10 additions & 6 deletions bridge/standard/pkg/transfer/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ type TransferStatus struct {
Error error
}

type Transfer struct {
type Transfer interface {
Do(ctx context.Context) <-chan TransferStatus
}

type transfer struct {
signer keysigner.KeySigner
amount *big.Int
destAddress common.Address
Expand All @@ -54,7 +58,7 @@ func NewTransferToSettlement(
l1RPCUrl string,
l1ContractAddr common.Address,
settlementContractAddr common.Address,
) (*Transfer, error) {
) (Transfer, error) {
l1Client, err := ethclient.Dial(l1RPCUrl)
if err != nil {
return nil, fmt.Errorf("failed to dial l1 rpc: %s", err)
Expand Down Expand Up @@ -88,7 +92,7 @@ func NewTransferToSettlement(
return nil, fmt.Errorf("failed to create settlement filterer: %s", err)
}

return &Transfer{
return &transfer{
signer: signer,
amount: amount,
destAddress: destAddress,
Expand All @@ -109,7 +113,7 @@ func NewTransferToL1(
l1RPCUrl string,
l1ContractAddr common.Address,
settlementContractAddr common.Address,
) (*Transfer, error) {
) (Transfer, error) {
l1Client, err := ethclient.Dial(l1RPCUrl)
if err != nil {
return nil, fmt.Errorf("failed to dial l1 rpc: %s", err)
Expand Down Expand Up @@ -146,7 +150,7 @@ func NewTransferToL1(
return nil, fmt.Errorf("failed to create settlement filterer: %s", err)
}

return &Transfer{
return &transfer{
amount: amount,
destAddress: destAddress,
signer: signer,
Expand All @@ -159,7 +163,7 @@ func NewTransferToL1(
}, nil
}

func (t *Transfer) Do(ctx context.Context) <-chan TransferStatus {
func (t *transfer) Do(ctx context.Context) <-chan TransferStatus {
statusChan := make(chan TransferStatus)
go func() {
defer close(statusChan)
Expand Down
13 changes: 4 additions & 9 deletions contracts/scripts/validator-registry/DeployForMockL1.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,33 @@ contract DeployForMockL1 is Script {
uint256 payoutPeriodBlocks = 200;
address owner = msg.sender;

console.log("Deploying VanillaRegistry...");
address vanillaRegistryProxy = Upgrades.deployUUPSProxy(
"VanillaRegistry.sol",
abi.encodeCall(
VanillaRegistry.initialize,
(minStake, slashOracle, slashReceiver, unstakePeriodBlocks, payoutPeriodBlocks, owner)
)
);
console.log("VanillaRegistry deployed at:", vanillaRegistryProxy);
console.log("_VanillaRegistry:", vanillaRegistryProxy);
VanillaRegistry vanillaRegistry = VanillaRegistry(payable(vanillaRegistryProxy));

address[] memory stakers = new address[](1);
stakers[0] = owner;
vanillaRegistry.whitelistStakers(stakers);

console.log("Deploying mock AVS and Middleware contracts...");
AlwaysFalseAVS mockAVS = new AlwaysFalseAVS();
AlwaysFalseMiddleware mockMiddleware = new AlwaysFalseMiddleware();
console.log("Mock AVS deployed at:", address(mockAVS));
console.log("Mock Middleware deployed at:", address(mockMiddleware));
console.log("_MockAVS:", address(mockAVS));
console.log("_MockMiddleware:", address(mockMiddleware));

console.log("Deploying ValidatorOptInRouter...");
address routerProxy = Upgrades.deployUUPSProxy(
"ValidatorOptInRouter.sol",
abi.encodeCall(
ValidatorOptInRouter.initialize,
(vanillaRegistryProxy, address(mockAVS), address(mockMiddleware), msg.sender)
)
);
console.log("ValidatorOptInRouter deployed at:", routerProxy);
console.log("ValidatorOptInRouter:", routerProxy);

uint256 batchSize = 5;
uint256 numKeys = 32;
Expand Down Expand Up @@ -104,7 +101,6 @@ contract DeployForMockL1 is Script {
pubkeysToRegister[31] = hex"ababbfe729893e69384ef1f32c7fa15902be6ace12aeaa21c56be726bc8c71e4e9b884735b82dbc619315752cffdb73e";

uint256 totalKeys = pubkeysToRegister.length;
console.log("Registering", totalKeys, "validators in batches of", batchSize);

for (uint256 i = 0; i < totalKeys; i += batchSize) {
uint256 currentBatchSize = batchSize;
Expand All @@ -118,7 +114,6 @@ contract DeployForMockL1 is Script {
uint256 batchStake = minStake * currentBatchSize;
vanillaRegistry.stake{value: batchStake}(batchKeys);
}
console.log("Successfully registered all validators");
vm.stopBroadcast();
}
}
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1796,6 +1796,7 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA=
github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg=
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I=
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8=
Expand Down
23 changes: 5 additions & 18 deletions infrastructure/docker/Dockerfile.bidderemulator
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY p2p/go.mod p2p/go.sum /app/p2p/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/

RUN cd /app/p2p && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download

COPY . .

RUN go build -o /app/bidder-emulator ./p2p/integrationtest/real-bidder

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/bidder-emulator /usr/local/bin/bidder-emulator
COPY --from=builder /app/p2p/integrationtest/real-bidder/entrypoint.sh entrypoint.sh
COPY --from=builder_ctx /go/bin/real-bidder /usr/local/bin/bidder-emulator
COPY --from=builder_ctx /scripts/bidder-emulator-entrypoint.sh entrypoint.sh

EXPOSE 8080

ENTRYPOINT ["./entrypoint.sh"]
21 changes: 4 additions & 17 deletions infrastructure/docker/Dockerfile.bridge
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY bridge/standard/go.mod bridge/standard/go.sum /app/bridge/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/

RUN cd /app/bridge && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download

COPY . .

RUN go build -o /app/mev-commit-bridge ./bridge/cmd

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/mev-commit-bridge /usr/local/bin/mev-commit-bridge
COPY --from=builder_ctx /go/bin/relayer /usr/local/bin/mev-commit-bridge

EXPOSE 8080

ENTRYPOINT ["mev-commit-bridge"]
58 changes: 58 additions & 0 deletions infrastructure/docker/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build

WORKDIR /ws

COPY go.work go.work.sum ./

COPY contracts-abi/go.mod contracts-abi/go.sum ./contracts-abi/
COPY p2p/go.mod p2p/go.sum ./p2p/
COPY oracle/go.mod oracle/go.sum ./oracle/
COPY testing/go.mod testing/go.sum ./testing/
COPY tools/go.mod tools/go.sum ./tools/
COPY x/go.mod x/go.sum ./x/
COPY bridge/standard/go.mod bridge/standard/go.sum ./bridge/standard/
COPY cl/go.mod cl/go.sum ./cl/
COPY infrastructure/tools/keystore-generator/go.mod infrastructure/tools/keystore-generator/go.sum ./infrastructure/tools/keystore-generator/

COPY p2p/integrationtest/real-bidder/entrypoint.sh /scripts/bidder-emulator-entrypoint.sh
COPY p2p/integrationtest/provider/entrypoint.sh /scripts/provider-emulator-entrypoint.sh

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
go work sync && \
go mod download all

COPY . .

ARG TARGETS="./oracle/cmd \
./p2p/cmd \
./bridge/standard/cmd/relayer \
./bridge/standard/cmd/emulator \
./infrastructure/tools/keystore-generator \
./testing/cmd \
./tools/preconf-rpc \
./tools/beacon-emulator \
./tools/dashboard \
./tools/bidder-cli \
./tools/bls-signer \
./tools/l1-transaction-emulator \
./tools/relay-emulator \
./tools/validators-monitor \
./tools/points-service \
./p2p/integrationtest/real-bidder \
./p2p/integrationtest/provider"

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
set -e; \
for path in ${TARGETS}; do \
# If the last element is literally "cmd", use the directory above it
bn=$(basename "$path"); \
if [ "$bn" = "cmd" ]; then \
name=$(basename "$(dirname "$path")"); \
else \
name=$bn; \
fi; \
echo "→ building $path as /go/bin/$name"; \
CGO_ENABLED=0 go build -o "/go/bin/$name" "$path"; \
done
21 changes: 4 additions & 17 deletions infrastructure/docker/Dockerfile.dashboard
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY tools/go.mod tools/go.sum /app/dashboard/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/

RUN cd /app/tools && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download

COPY . .

RUN go build -o /app/mev-commit-dashboard ./tools/dashboard

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/mev-commit-dashboard /usr/local/bin/mev-commit-dashboard
COPY --from=builder_ctx /go/bin/dashboard /usr/local/bin/mev-commit-dashboard

EXPOSE 8080

ENTRYPOINT ["mev-commit-dashboard"]
23 changes: 2 additions & 21 deletions infrastructure/docker/Dockerfile.l1transactor
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY tools/go.mod tools/go.sum /app/tools/
COPY p2p/go.mod p2p/go.sum /app/p2p/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/
COPY bridge/standard/go.mod bridge/standard/go.sum /app/bridge/standard/

RUN cd /app/tools && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download
RUN cd /app/p2p && go mod download
RUN cd /app/bridge/standard && go mod download

COPY . .

RUN go build -o /app/l1-transactor ./tools/l1-transaction-emulator

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/l1-transactor /usr/local/bin/l1-transactor
COPY --from=builder_ctx /go/bin/l1-transaction-emulator /usr/local/bin/l1-transactor

ENTRYPOINT ["l1-transactor"]
21 changes: 4 additions & 17 deletions infrastructure/docker/Dockerfile.oracle
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY oracle/go.mod oracle/go.sum /app/oracle/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/

RUN cd /app/oracle && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download

COPY . .

RUN go build -o /app/mev-commit-oracle ./oracle/cmd

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/mev-commit-oracle /usr/local/bin/mev-commit-oracle
COPY --from=builder_ctx /go/bin/oracle /usr/local/bin/mev-commit-oracle

EXPOSE 8080

ENTRYPOINT ["mev-commit-oracle", "start"]
21 changes: 4 additions & 17 deletions infrastructure/docker/Dockerfile.p2p
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY p2p/go.mod p2p/go.sum /app/p2p/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/

RUN cd /app/p2p && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download

COPY . .

RUN go build -o /app/mev-commit ./p2p/cmd

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/mev-commit /usr/local/bin/mev-commit
COPY --from=builder_ctx /go/bin/p2p /usr/local/bin/mev-commit

EXPOSE 13522 13523 13524

ENTRYPOINT ["mev-commit"]
23 changes: 5 additions & 18 deletions infrastructure/docker/Dockerfile.provideremulator
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
FROM golang:1.23.0-alpine AS builder

WORKDIR /app

COPY p2p/go.mod p2p/go.sum /app/p2p/
COPY x/go.mod x/go.sum /app/x/
COPY contracts-abi/go.mod contracts-abi/go.sum /app/contracts-abi/

RUN cd /app/p2p && go mod download
RUN cd /app/x && go mod download
RUN cd /app/contracts-abi && go mod download

COPY . .

RUN go build -o /app/provider-emulator ./p2p/integrationtest/provider

# syntax=docker/dockerfile:1.4
FROM alpine:3.10

COPY --from=builder /app/provider-emulator /usr/local/bin/provider-emulator
COPY --from=builder /app/p2p/integrationtest/provider/entrypoint.sh entrypoint.sh
COPY --from=builder_ctx /go/bin/provider /usr/local/bin/provider-emulator
COPY --from=builder_ctx /scripts/provider-emulator-entrypoint.sh entrypoint.sh

EXPOSE 8080

ENTRYPOINT ["./entrypoint.sh"]
Loading
Loading