diff --git a/go.mod b/go.mod index a6faf6a..647db8a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cairoeth/preconfirmations-avs +module github.com/cairoeth/preconfirmations go 1.21 diff --git a/preconf-operator/cmd/operator/main.go b/preconf-operator/cmd/operator/main.go index 8c8006e..c9b0b45 100644 --- a/preconf-operator/cmd/operator/main.go +++ b/preconf-operator/cmd/operator/main.go @@ -3,22 +3,14 @@ package main import ( "context" "encoding/json" - // "errors" - // "fmt" "log" - // "net/http" "os" - // "os/signal" - // "syscall" - // "time" "github.com/urfave/cli" - "github.com/cairoeth/preconfirmations-avs/preconf-operator" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/core/config" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/types" - - // "github.com/cairoeth/preconfirmations-avs/preconf-share/jsonrpcserver" + "github.com/cairoeth/preconfirmations/preconf-operator" + "github.com/cairoeth/preconfirmations/preconf-operator/core/config" + "github.com/cairoeth/preconfirmations/preconf-operator/types" sdkutils "github.com/Layr-Labs/eigensdk-go/utils" ) diff --git a/preconf-operator/core/chainio/avs_reader.go b/preconf-operator/core/chainio/avs_reader.go index efcca3c..9bfb4a7 100644 --- a/preconf-operator/core/chainio/avs_reader.go +++ b/preconf-operator/core/chainio/avs_reader.go @@ -9,8 +9,8 @@ import ( "github.com/Layr-Labs/eigensdk-go/chainio/clients/eth" logging "github.com/Layr-Labs/eigensdk-go/logging" - erc20mock "github.com/cairoeth/preconfirmations-avs/contracts/bindings/ERC20Mock" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/core/config" + erc20mock "github.com/cairoeth/preconfirmations/contracts/bindings/ERC20Mock" + "github.com/cairoeth/preconfirmations/preconf-operator/core/config" ) type AvsReaderer interface { diff --git a/preconf-operator/core/chainio/avs_writer.go b/preconf-operator/core/chainio/avs_writer.go index 01145f8..fc01552 100644 --- a/preconf-operator/core/chainio/avs_writer.go +++ b/preconf-operator/core/chainio/avs_writer.go @@ -8,7 +8,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/chainio/txmgr" logging "github.com/Layr-Labs/eigensdk-go/logging" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/core/config" + "github.com/cairoeth/preconfirmations/preconf-operator/core/config" ) type AvsWriterer interface { diff --git a/preconf-operator/core/chainio/bindings.go b/preconf-operator/core/chainio/bindings.go index 77ee80a..5acd2ed 100644 --- a/preconf-operator/core/chainio/bindings.go +++ b/preconf-operator/core/chainio/bindings.go @@ -9,9 +9,9 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" regcoord "github.com/Layr-Labs/eigensdk-go/contracts/bindings/RegistryCoordinator" - erc20mock "github.com/cairoeth/preconfirmations-avs/contracts/bindings/ERC20Mock" - preconfchallengemanager "github.com/cairoeth/preconfirmations-avs/contracts/bindings/PreconfChallengeManager" - preconfservicemanager "github.com/cairoeth/preconfirmations-avs/contracts/bindings/PreconfServiceManager" + erc20mock "github.com/cairoeth/preconfirmations/contracts/bindings/ERC20Mock" + preconfchallengemanager "github.com/cairoeth/preconfirmations/contracts/bindings/PreconfChallengeManager" + preconfservicemanager "github.com/cairoeth/preconfirmations/contracts/bindings/PreconfServiceManager" ) type AvsManagersBindings struct { diff --git a/preconf-operator/operator.go b/preconf-operator/operator.go index 838c505..40e5a66 100644 --- a/preconf-operator/operator.go +++ b/preconf-operator/operator.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/Layr-Labs/incredible-squaring-avs/metrics" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/core/chainio" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/receiverapi" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/sse" - "github.com/cairoeth/preconfirmations-avs/preconf-operator/types" + "github.com/cairoeth/preconfirmations/preconf-operator/core/chainio" + "github.com/cairoeth/preconfirmations/preconf-operator/receiverapi" + "github.com/cairoeth/preconfirmations/preconf-operator/sse" + "github.com/cairoeth/preconfirmations/preconf-operator/types" "github.com/Layr-Labs/eigensdk-go/chainio/clients" sdkelcontracts "github.com/Layr-Labs/eigensdk-go/chainio/clients/elcontracts" @@ -29,7 +29,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/nodeapi" "github.com/Layr-Labs/eigensdk-go/signerv2" sdktypes "github.com/Layr-Labs/eigensdk-go/types" - "github.com/cairoeth/preconfirmations-avs/preconf-share/preconshare" + "github.com/cairoeth/preconfirmations/preconf-share/preconshare" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/ybbus/jsonrpc/v3" diff --git a/preconf-operator/sse/types.go b/preconf-operator/sse/types.go index 73ad789..74a50b7 100644 --- a/preconf-operator/sse/types.go +++ b/preconf-operator/sse/types.go @@ -1,7 +1,7 @@ package sse import ( - "github.com/cairoeth/preconfirmations-avs/preconf-operator/types" + "github.com/cairoeth/preconfirmations/preconf-operator/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ) diff --git a/preconf-share/README.md b/preconf-share/README.md deleted file mode 100644 index 3b6c3c4..0000000 --- a/preconf-share/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Preconf-Share - -### Dependencies - -- Redis: Used for hint streaming and priority queue. -- Postgres: Used for storing bundles and historical hints. - -### Configuration - -The full list of configuration options can be found in [preconf-share/cmd/node/main.go](preconf-share/cmd/node/main.go). - -### Running Locally - -```bash -docker-compose up # start services: redis and postgres - -# apply migration -for file in preconf-share/sql/*.sql; do psql "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" -f $file; done - -# run blockchain -anvil - -# run node -make && ./build/node -``` \ No newline at end of file diff --git a/preconf-share/cmd/node/main.go b/preconf-share/cmd/node/main.go index dfc2a36..e3ebdbf 100644 --- a/preconf-share/cmd/node/main.go +++ b/preconf-share/cmd/node/main.go @@ -15,9 +15,9 @@ import ( "time" "github.com/VictoriaMetrics/metrics" - "github.com/cairoeth/preconfirmations-avs/preconf-share/jsonrpcserver" - "github.com/cairoeth/preconfirmations-avs/preconf-share/preconshare" - "github.com/cairoeth/preconfirmations-avs/preconf-share/simqueue" + "github.com/cairoeth/preconfirmations/preconf-share/jsonrpcserver" + "github.com/cairoeth/preconfirmations/preconf-share/preconshare" + "github.com/cairoeth/preconfirmations/preconf-share/simqueue" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/flashbots/go-utils/cli" diff --git a/preconf-share/preconshare/api.go b/preconf-share/preconshare/api.go index 0b467b2..a4f1c74 100644 --- a/preconf-share/preconshare/api.go +++ b/preconf-share/preconshare/api.go @@ -5,9 +5,9 @@ import ( "errors" "time" - "github.com/cairoeth/preconfirmations-avs/preconf-share/jsonrpcserver" - "github.com/cairoeth/preconfirmations-avs/preconf-share/metrics" - "github.com/cairoeth/preconfirmations-avs/preconf-share/spike" + "github.com/cairoeth/preconfirmations/preconf-share/jsonrpcserver" + "github.com/cairoeth/preconfirmations/preconf-share/metrics" + "github.com/cairoeth/preconfirmations/preconf-share/spike" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/lru" diff --git a/preconf-share/preconshare/sim_queue.go b/preconf-share/preconshare/sim_queue.go index 1dc7815..7d36488 100644 --- a/preconf-share/preconshare/sim_queue.go +++ b/preconf-share/preconshare/sim_queue.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/cairoeth/preconfirmations-avs/preconf-share/metrics" - "github.com/cairoeth/preconfirmations-avs/preconf-share/simqueue" + "github.com/cairoeth/preconfirmations/preconf-share/metrics" + "github.com/cairoeth/preconfirmations/preconf-share/simqueue" "github.com/cenkalti/backoff/v4" "github.com/ethereum/go-ethereum/common" "go.uber.org/zap" diff --git a/preconf-share/preconshare/sim_result_backend.go b/preconf-share/preconshare/sim_result_backend.go index e563504..38c4d8a 100644 --- a/preconf-share/preconshare/sim_result_backend.go +++ b/preconf-share/preconshare/sim_result_backend.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/cairoeth/preconfirmations-avs/preconf-share/simqueue" + "github.com/cairoeth/preconfirmations/preconf-share/simqueue" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ybbus/jsonrpc/v3" diff --git a/preconf-share/simqueue/queue.go b/preconf-share/simqueue/queue.go index 68eb7d6..d80cfed 100644 --- a/preconf-share/simqueue/queue.go +++ b/preconf-share/simqueue/queue.go @@ -69,7 +69,7 @@ import ( "sync/atomic" "time" - "github.com/cairoeth/preconfirmations-avs/preconf-share/metrics" + "github.com/cairoeth/preconfirmations/preconf-share/metrics" "github.com/cenkalti/backoff/v4" "github.com/redis/go-redis/v9" "go.uber.org/zap" diff --git a/rpc/cmd/mockbackend/main.go b/rpc/cmd/mockbackend/main.go index 68f8990..a5ac03b 100644 --- a/rpc/cmd/mockbackend/main.go +++ b/rpc/cmd/mockbackend/main.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/cairoeth/preconfirmations-avs/rpc/testutils" + "github.com/cairoeth/preconfirmations/rpc/testutils" ) func main() { diff --git a/rpc/cmd/server/main.go b/rpc/cmd/server/main.go index 63e75c5..0c09309 100644 --- a/rpc/cmd/server/main.go +++ b/rpc/cmd/server/main.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/cairoeth/preconfirmations-avs/rpc/database" - "github.com/cairoeth/preconfirmations-avs/rpc/server" + "github.com/cairoeth/preconfirmations/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/server" "github.com/ethereum/go-ethereum/crypto" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/rpc/cmd/txdecoder/main.go b/rpc/cmd/txdecoder/main.go index bb73f7e..00c15d5 100644 --- a/rpc/cmd/txdecoder/main.go +++ b/rpc/cmd/txdecoder/main.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/cairoeth/preconfirmations-avs/rpc/server" + "github.com/cairoeth/preconfirmations/rpc/server" ) var rawTx = "" diff --git a/rpc/server/configuration.go b/rpc/server/configuration.go index fda5521..508fa53 100644 --- a/rpc/server/configuration.go +++ b/rpc/server/configuration.go @@ -3,7 +3,7 @@ package server import ( "crypto/ecdsa" - "github.com/cairoeth/preconfirmations-avs/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/database" "go.uber.org/zap" ) diff --git a/rpc/server/request_handler.go b/rpc/server/request_handler.go index dea5a89..e6aca67 100644 --- a/rpc/server/request_handler.go +++ b/rpc/server/request_handler.go @@ -7,8 +7,8 @@ import ( "net/http" "time" - "github.com/cairoeth/preconfirmations-avs/rpc/database" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/google/uuid" "go.uber.org/zap" ) diff --git a/rpc/server/request_intercepts.go b/rpc/server/request_intercepts.go index 9449e90..41ee66d 100644 --- a/rpc/server/request_intercepts.go +++ b/rpc/server/request_intercepts.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "go.uber.org/zap" ) diff --git a/rpc/server/request_processor.go b/rpc/server/request_processor.go index e3a69cc..35f8816 100644 --- a/rpc/server/request_processor.go +++ b/rpc/server/request_processor.go @@ -14,10 +14,10 @@ import ( "strings" "time" - "github.com/cairoeth/preconfirmations-avs/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/database" - "github.com/cairoeth/preconfirmations-avs/preconf-share/preconshare" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/preconf-share/preconshare" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" diff --git a/rpc/server/request_processor_test.go b/rpc/server/request_processor_test.go index bd1fed7..b48a596 100644 --- a/rpc/server/request_processor_test.go +++ b/rpc/server/request_processor_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/alicebob/miniredis" - "github.com/cairoeth/preconfirmations-avs/rpc/testutils" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/testutils" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/stretchr/testify/require" ) diff --git a/rpc/server/request_record.go b/rpc/server/request_record.go index 1f351dd..b55f9a2 100644 --- a/rpc/server/request_record.go +++ b/rpc/server/request_record.go @@ -5,7 +5,7 @@ import ( "net/http" "sync" - "github.com/cairoeth/preconfirmations-avs/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/database" "github.com/google/uuid" ) diff --git a/rpc/server/request_record_test.go b/rpc/server/request_record_test.go index 9d0fac5..0fd9b9f 100644 --- a/rpc/server/request_record_test.go +++ b/rpc/server/request_record_test.go @@ -4,7 +4,7 @@ import ( "sync" "testing" - "github.com/cairoeth/preconfirmations-avs/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/database" "github.com/google/uuid" "github.com/stretchr/testify/require" ) diff --git a/rpc/server/request_response.go b/rpc/server/request_response.go index 317de8b..0e435db 100644 --- a/rpc/server/request_response.go +++ b/rpc/server/request_response.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net/http" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "go.uber.org/zap" ) diff --git a/rpc/server/request_sendrawtx.go b/rpc/server/request_sendrawtx.go index cf6b228..d26090a 100644 --- a/rpc/server/request_sendrawtx.go +++ b/rpc/server/request_sendrawtx.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" diff --git a/rpc/server/server.go b/rpc/server/server.go index 366d9b9..f69c49c 100644 --- a/rpc/server/server.go +++ b/rpc/server/server.go @@ -15,12 +15,12 @@ import ( "syscall" "time" - "github.com/cairoeth/preconfirmations-avs/rpc/adapters/webfile" - "github.com/cairoeth/preconfirmations-avs/rpc/application" - "github.com/cairoeth/preconfirmations-avs/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/adapters/webfile" + "github.com/cairoeth/preconfirmations/rpc/application" + "github.com/cairoeth/preconfirmations/rpc/database" "github.com/alicebob/miniredis" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/pkg/errors" "go.uber.org/zap" ) diff --git a/rpc/server/url_params.go b/rpc/server/url_params.go index b1679fc..6c2139d 100644 --- a/rpc/server/url_params.go +++ b/rpc/server/url_params.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" ) diff --git a/rpc/server/url_params_test.go b/rpc/server/url_params_test.go index cb66d0f..7bf6b93 100644 --- a/rpc/server/url_params_test.go +++ b/rpc/server/url_params_test.go @@ -4,7 +4,7 @@ import ( "net/url" "testing" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" ) diff --git a/rpc/server/util.go b/rpc/server/util.go index f1bf841..4aae4af 100644 --- a/rpc/server/util.go +++ b/rpc/server/util.go @@ -11,7 +11,7 @@ import ( "os" "strings" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" diff --git a/rpc/tests/e2e_test.go b/rpc/tests/e2e_test.go index 55f578f..6af9304 100644 --- a/rpc/tests/e2e_test.go +++ b/rpc/tests/e2e_test.go @@ -14,12 +14,12 @@ import ( "strings" "testing" - "github.com/cairoeth/preconfirmations-avs/rpc/database" + "github.com/cairoeth/preconfirmations/rpc/database" "github.com/alicebob/miniredis" - "github.com/cairoeth/preconfirmations-avs/rpc/server" - "github.com/cairoeth/preconfirmations-avs/rpc/testutils" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/server" + "github.com/cairoeth/preconfirmations/rpc/testutils" + "github.com/cairoeth/preconfirmations/rpc/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/rpc/testutils/mock_rpcbackend.go b/rpc/testutils/mock_rpcbackend.go index 2faf14a..8f7b83a 100644 --- a/rpc/testutils/mock_rpcbackend.go +++ b/rpc/testutils/mock_rpcbackend.go @@ -12,7 +12,7 @@ import ( "net/http" "time" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" ) var ( diff --git a/rpc/testutils/mock_txapibackend.go b/rpc/testutils/mock_txapibackend.go index 0475081..0bee398 100644 --- a/rpc/testutils/mock_txapibackend.go +++ b/rpc/testutils/mock_txapibackend.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" ) var MockTxApiStatusForHash map[string]types.PrivateTxStatus = make(map[string]types.PrivateTxStatus) diff --git a/rpc/testutils/rpctesthelpers.go b/rpc/testutils/rpctesthelpers.go index 4dd1088..db41552 100644 --- a/rpc/testutils/rpctesthelpers.go +++ b/rpc/testutils/rpctesthelpers.go @@ -12,7 +12,7 @@ import ( "github.com/pkg/errors" - "github.com/cairoeth/preconfirmations-avs/rpc/types" + "github.com/cairoeth/preconfirmations/rpc/types" ) var RpcEndpointUrl string // set by tests