Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cf716c1
feat: integrate address directory to eth reader
hopeyen Jun 26, 2025
2a9ba2d
feat: fix BLS_OPERATOR_STATE_RETRIEVER typo
hopeyen Jun 27, 2025
23bbb80
refactor: config valid check, interface binding, getAddress0
hopeyen Jun 30, 2025
abca944
fix: check zero addr, rm unused binding, err msg
hopeyen Jul 1, 2025
6cc92c7
feat: address directory reader
hopeyen Jul 1, 2025
47420e9
refactor: abstract the getter
hopeyen Jul 1, 2025
ef7fdf5
rebase: master; add check of contract names
hopeyen Jul 1, 2025
4979872
refactor: remove old new eth reader/writer method
hopeyen Jul 1, 2025
7bdc315
refactor: update flags and configs for address dir
hopeyen Jul 1, 2025
783556e
fix: chuner config lint
hopeyen Jul 1, 2025
9b8c410
fix: more lints
hopeyen Jul 1, 2025
373a59a
fix: more lints
hopeyen Jul 1, 2025
8d7091c
fix: inabox config
hopeyen Jul 2, 2025
d54cc18
refactor(ethClient): comment cleanup
hopeyen Jul 2, 2025
68389e8
Merge branch 'master' into hope/integrate-address-directory
hopeyen Jul 2, 2025
7a9aee4
refactor(EigenDADirectory): update names and validation
hopeyen Jul 2, 2025
a01d3cf
refactor(EigenDADirectory): always get latest list of contract names
hopeyen Jul 2, 2025
f3f3f7a
Merge branch 'master' into hope/integrate-address-directory
hopeyen Jul 2, 2025
be3da55
fix(EigenDADirectory): add service manager flag back to retreiver
hopeyen Jul 2, 2025
d037753
refactor(proxy): add address directory config
hopeyen Jul 2, 2025
0018c86
refactor(proxy): add address directory config in test setup
hopeyen Jul 2, 2025
4b8e39f
refactor(EigenDADirectory): rename more address directory to eigenda …
hopeyen Jul 2, 2025
1ea1ff4
refactor(EigenDADirectory): more renaming
hopeyen Jul 2, 2025
569ba0e
fix(EigenDADirectory): relay inabox config
hopeyen Jul 2, 2025
ad4775d
fix(EigenDADirectory): add back flags and configs
hopeyen Jul 3, 2025
e24d27a
Merge branch 'master' into hope/integrate-address-directory
hopeyen Jul 3, 2025
29e64a1
fix(EigenDADirectory): add back flags and configs
hopeyen Jul 3, 2025
7651b9b
fix(EigenDADirectory): inabox config
hopeyen Jul 3, 2025
5dc336e
fix(EigenDADirectory): make all three flags optional
hopeyen Jul 3, 2025
dfc9e70
chore(proxy): gen-static-help-output
hopeyen Jul 3, 2025
17c3e67
refactor(EigenDADirectory): help msgs
hopeyen Jul 3, 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
15 changes: 10 additions & 5 deletions api/clients/v2/examples/client_construction.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ import (
// These constants are specific to the EigenDA holesky testnet. To execute the provided examples on a different
// network, you will need to set these constants to the correct values, based on the chosen network.
const (
ethRPCURL = "https://ethereum-holesky-rpc.publicnode.com"
disperserHostname = "disperser-testnet-holesky.eigenda.xyz"
certVerifierRouterAddress = "0x7F40A8e1B62aa1c8Afed23f6E8bAe0D340A4BC4e"
registryCoordinatorAddress = "0x53012C69A189cfA2D9d29eb6F19B32e0A2EA3490"
ethRPCURL = "https://ethereum-holesky-rpc.publicnode.com"
disperserHostname = "disperser-testnet-holesky.eigenda.xyz"
certVerifierRouterAddress = "0x7F40A8e1B62aa1c8Afed23f6E8bAe0D340A4BC4e"
registryCoordinatorAddress = "0x53012C69A189cfA2D9d29eb6F19B32e0A2EA3490"
// To build Eth Client
eigendaDirectoryAddress = "0x90776Ea0E99E4c38aA1Efe575a61B3E40160A2FE"
// These two addresses are no longer required for the Eth Client, but parameter is still being taken until we deprecate the flags
eigenDAServiceManagerAddress = ""
// blsOperatorStateRetrieverAddress is still used for CertBuilder
blsOperatorStateRetrieverAddress = "0x003497Dd77E5B73C40e8aCbB562C8bb0410320E7"
eigenDAServiceManagerAddress = "0xD4A7E1Bd8015057293f0D0A557088c286942e84b"
)

func createPayloadDisperser(privateKey string) (*payloaddispersal.PayloadDisperser, error) {
Expand Down Expand Up @@ -332,6 +336,7 @@ func createEthReader(logger logging.Logger, ethClient common.EthClient) (*eth.Re
ethReader, err := eth.NewReader(
logger,
ethClient,
eigendaDirectoryAddress,
blsOperatorStateRetrieverAddress,
eigenDAServiceManagerAddress,
)
Expand Down
5 changes: 5 additions & 0 deletions api/proxy/common/client_config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type ClientConfigV2 struct {
// Fields required for validator payload retrieval
BLSOperatorStateRetrieverAddr string
EigenDAServiceManagerAddr string
EigenDADirectory string

// Allowed distance (in L1 blocks) between the eigenDA cert's reference block number (RBN)
// and the L1 block number at which the cert was included in the rollup's batch inbox.
Expand Down Expand Up @@ -77,6 +78,10 @@ func (cfg *ClientConfigV2) Check() error {
}

if slices.Contains(cfg.RetrieversToEnable, ValidatorRetrieverType) {
if cfg.EigenDADirectory == "" {
return fmt.Errorf("EigenDA directory is required for validator retrieval in EigenDA V2 backend")
}

if cfg.BLSOperatorStateRetrieverAddr == "" {
return fmt.Errorf(
"BLS operator state retriever address is required for validator retrieval in EigenDA V2 backend")
Expand Down
14 changes: 14 additions & 0 deletions api/proxy/common/eigenda_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ const (
SepoliaTestnetEigenDANetwork EigenDANetwork = "sepolia_testnet"
)

// GetEigenDADirectory returns, as a string, the address of the EigenDADirectory contract for the network.
func (n EigenDANetwork) GetEigenDADirectory() (string, error) {
switch n {
case HoleskyTestnetEigenDANetwork:
return "0x90776Ea0E99E4c38aA1Efe575a61B3E40160A2FE", nil
case HoleskyPreprodEigenDANetwork:
return "0xfB676e909f376efFDbDee7F17342aCF55f6Ec502", nil
case SepoliaTestnetEigenDANetwork:
return "0x9620dC4B3564198554e4D2b06dEFB7A369D90257", nil
default:
return "", fmt.Errorf("unknown network type: %s", n)
}
}

// GetServiceManagerAddress returns, as a string, the address of the EigenDAServiceManager contract for the network.
func (n EigenDANetwork) GetServiceManagerAddress() (string, error) {
switch n {
Expand Down
22 changes: 20 additions & 2 deletions api/proxy/config/v2/eigendaflags/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var (
)
ServiceManagerAddrFlagName = withFlagPrefix("service-manager-addr")
BLSOperatorStateRetrieverFlagName = withFlagPrefix("bls-operator-state-retriever-addr")
Comment on lines 30 to 31
Copy link
Collaborator

Choose a reason for hiding this comment

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

think we should mark these as deprecated and hint people to start moving to the eigenda-directory? Prob want to do it across all of our services (apiserver, nodes, etc). Everything in this PR. And eventually we'll remove all other address flags and only keep the eigenda-directory.

not sure if urfave has a way to mark flags as deprecated. If not then we might need to manually log a warn. cc @dmanc who will be updating our helm charts to use these new flags. Can you also add this as a note to this PR description? This kind of external config changes are very important to highlight.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i made a linear ticket for proxy, and for all services ticket. I will add notes to the PR description

EigenDADirectoryFlagName = withFlagPrefix("eigenda-directory")
RelayTimeoutFlagName = withFlagPrefix("relay-timeout")
ValidatorTimeoutFlagName = withFlagPrefix("validator-timeout")
ContractCallTimeoutFlagName = withFlagPrefix("contract-call-timeout")
Expand Down Expand Up @@ -118,18 +119,25 @@ func CLIFlags(envPrefix, category string) []cli.Flag {
},
&cli.StringFlag{
Name: ServiceManagerAddrFlagName,
Usage: "Address of the EigenDA service manager contract.",
Usage: "[Deprecated: use EigenDADirectory instead] Address of the EigenDA Service Manager contract.",
EnvVars: []string{withEnvPrefix(envPrefix, "SERVICE_MANAGER_ADDR")},
Category: category,
Required: false,
},
&cli.StringFlag{
Name: BLSOperatorStateRetrieverFlagName,
Usage: "Address of the BLS operator state retriever contract.",
Usage: "[Deprecated: use EigenDADirectory instead] Address of the BLS operator state retriever contract.",
EnvVars: []string{withEnvPrefix(envPrefix, "BLS_OPERATOR_STATE_RETRIEVER_ADDR")},
Category: category,
Required: false,
},
&cli.StringFlag{
Name: EigenDADirectoryFlagName,
Usage: "Address of the EigenDA directory contract, which points to all other EigenDA contract addresses. This is the only contract entrypoint needed offchain..",
EnvVars: []string{withEnvPrefix(envPrefix, "EIGENDA_DIRECTORY")},
Category: category,
Required: false,
},
&cli.DurationFlag{
Name: ContractCallTimeoutFlagName,
Usage: "Timeout used when performing smart contract call operation (i.e, eth_call).",
Expand Down Expand Up @@ -234,6 +242,15 @@ func ReadClientConfigV2(ctx *cli.Context) (common.ClientConfigV2, error) {
}
}

eigenDADirectory := ctx.String(EigenDADirectoryFlagName)
if eigenDADirectory == "" {
eigenDADirectory, err = eigenDANetwork.GetEigenDADirectory()
if err != nil {
return common.ClientConfigV2{}, fmt.Errorf(
"service manager address wasn't specified, and failed to get it from the specified network: %w", err)
}
}

serviceManagerAddress := ctx.String(ServiceManagerAddrFlagName)
if serviceManagerAddress == "" {
serviceManagerAddress, err = eigenDANetwork.GetServiceManagerAddress()
Expand Down Expand Up @@ -271,6 +288,7 @@ func ReadClientConfigV2(ctx *cli.Context) (common.ClientConfigV2, error) {
BLSOperatorStateRetrieverAddr: blsOperatorStateRetrieverAddress,
EigenDACertVerifierOrRouterAddress: ctx.String(CertVerifierRouterOrImmutableVerifierAddrFlagName),
EigenDAServiceManagerAddr: serviceManagerAddress,
EigenDADirectory: eigenDADirectory,
RBNRecencyWindowSize: ctx.Uint64(RBNRecencyWindowSizeFlagName),
EigenDANetwork: eigenDANetwork,
}, nil
Expand Down
5 changes: 3 additions & 2 deletions api/proxy/docs/help_out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ GLOBAL OPTIONS:
--eigenda.v2.blob-status-poll-interval value Duration to query for blob status updates during dispersal. (default: 1s) [$EIGENDA_PROXY_EIGENDA_V2_BLOB_STATUS_POLL_INTERVAL]
--eigenda.v2.blob-version value Blob params version used when dispersing. This refers to a global version maintained by EigenDA
governance and is injected in the BlobHeader before dispersing. Currently only supports (0). (default: 0) [$EIGENDA_PROXY_EIGENDA_V2_BLOB_PARAMS_VERSION]
--eigenda.v2.bls-operator-state-retriever-addr value Address of the BLS operator state retriever contract. [$EIGENDA_PROXY_EIGENDA_V2_BLS_OPERATOR_STATE_RETRIEVER_ADDR]
--eigenda.v2.bls-operator-state-retriever-addr value [Deprecated: use EigenDADirectory instead] Address of the BLS operator state retriever contract. [$EIGENDA_PROXY_EIGENDA_V2_BLS_OPERATOR_STATE_RETRIEVER_ADDR]
--eigenda.v2.cert-verifier-router-or-immutable-verifier-addr value Address of either the EigenDACertVerifierRouter or immutable EigenDACertVerifier contract. Required for performing eth_calls to verify EigenDA certificates. [$EIGENDA_PROXY_EIGENDA_V2_CERT_VERIFIER_ROUTER_OR_IMMUTABLE_VERIFIER_ADDR]
--eigenda.v2.contract-call-timeout value Timeout used when performing smart contract call operation (i.e, eth_call). (default: 10s) [$EIGENDA_PROXY_EIGENDA_V2_CONTRACT_CALL_TIMEOUT]
--eigenda.v2.disable-point-evaluation Disables IFFT transformation done during payload encoding. Using this mode results in blobs that can't be proven. (default: false) [$EIGENDA_PROXY_EIGENDA_V2_DISABLE_POINT_EVALUATION]
--eigenda.v2.disable-tls Disable TLS for gRPC communication with the EigenDA disperser and retrieval subnet. (default: false) [$EIGENDA_PROXY_EIGENDA_V2_GRPC_DISABLE_TLS]
--eigenda.v2.disperse-blob-timeout value Maximum amount of time to wait for a blob to disperse against v2 protocol. (default: 2m0s) [$EIGENDA_PROXY_EIGENDA_V2_DISPERSE_BLOB_TIMEOUT]
--eigenda.v2.disperser-rpc value RPC endpoint of the EigenDA disperser. [$EIGENDA_PROXY_EIGENDA_V2_DISPERSER_RPC]
--eigenda.v2.eigenda-directory value Address of the EigenDA directory contract, which points to all other EigenDA contract addresses. This is the only contract entrypoint needed offchain.. [$EIGENDA_PROXY_EIGENDA_V2_EIGENDA_DIRECTORY]
--eigenda.v2.eth-rpc value URL of the Ethereum RPC endpoint. [$EIGENDA_PROXY_EIGENDA_V2_ETH_RPC]
--eigenda.v2.max-blob-length value Maximum blob length to be written or read from EigenDA. Determines the number of SRS points
loaded into memory for KZG commitments. Example units: '30MiB', '4Kb', '30MB'. Maximum size
Expand All @@ -78,7 +79,7 @@ in the rollup's batch inbox. A cert is valid when cert.RBN < certL1InclusionBloc
and otherwise is considered stale and verification will fail, and a 418 HTTP error will be returned.
This check is optional and will be skipped when set to 0. (default: 0) [$EIGENDA_PROXY_EIGENDA_V2_RBN_RECENCY_WINDOW_SIZE]
--eigenda.v2.relay-timeout value Timeout used when querying an individual relay for blob contents. (default: 10s) [$EIGENDA_PROXY_EIGENDA_V2_RELAY_TIMEOUT]
--eigenda.v2.service-manager-addr value Address of the EigenDA service manager contract. [$EIGENDA_PROXY_EIGENDA_V2_SERVICE_MANAGER_ADDR]
--eigenda.v2.service-manager-addr value [Deprecated: use EigenDADirectory instead] Address of the EigenDA Service Manager contract. [$EIGENDA_PROXY_EIGENDA_V2_SERVICE_MANAGER_ADDR]
--eigenda.v2.signer-payment-key-hex value Hex-encoded signer private key. Used for authorizing payments with EigenDA disperser. Should not be associated with an Ethereum address holding any funds. [$EIGENDA_PROXY_EIGENDA_V2_SIGNER_PRIVATE_KEY_HEX]
--eigenda.v2.validator-timeout value Timeout used when retrieving chunks directly from EigenDA validators. This is a secondary retrieval method, in case retrieval from the relay network fails. (default: 2m0s) [$EIGENDA_PROXY_EIGENDA_V2_VALIDATOR_TIMEOUT]

Expand Down
1 change: 1 addition & 0 deletions api/proxy/store/builder/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func validCfg() Config {
MaxBlobSizeBytes: maxBlobLengthBytes,
BLSOperatorStateRetrieverAddr: "0x000000000004324311",
EigenDAServiceManagerAddr: "0x000000000005324322",
EigenDADirectory: "0x000000000006324333",
RetrieversToEnable: []common.RetrieverType{
common.RelayRetrieverType,
common.ValidatorRetrieverType,
Expand Down
1 change: 1 addition & 0 deletions api/proxy/store/builder/storage_manager_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ func buildEthReader(log logging.Logger,
ethReader, err := eth.NewReader(
log,
ethClient,
clientConfigV2.EigenDADirectory,
clientConfigV2.BLSOperatorStateRetrieverAddr,
clientConfigV2.EigenDAServiceManagerAddr,
)
Expand Down
8 changes: 8 additions & 0 deletions api/proxy/test/testutils/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,19 @@ const (
preprodCertVerifierAddress = "0xCCFE3d87fB7D369f1eeE65221a29A83f1323043C"
preprodSvcManagerAddress = "0x54A03db2784E3D0aCC08344D05385d0b62d4F432"
preprodBLSOperatorStateRetrieverAddress = "0x003497Dd77E5B73C40e8aCbB562C8bb0410320E7"
preprodEigenDADirectory = "0xfB676e909f376efFDbDee7F17342aCF55f6Ec502"

disperserTestnetHostname = "disperser-testnet-holesky.eigenda.xyz"
testnetCertVerifierAddress = "0xd305aeBcdEc21D00fDF8796CE37d0e74836a6B6e"
testnetSvcManagerAddress = "0xD4A7E1Bd8015057293f0D0A557088c286942e84b"
testnetBLSOperatorStateRetrieverAddress = "0x003497Dd77E5B73C40e8aCbB562C8bb0410320E7"
testnetEigenDADirectory = "0x90776Ea0E99E4c38aA1Efe575a61B3E40160A2FE"

disperserSepoliaHostname = "disperser-testnet-sepolia.eigenda.xyz"
sepoliaCertVerifierAddress = "0x58D2B844a894f00b7E6F9F492b9F43aD54Cd4429"
sepoliaSvcManagerAddress = "0x3a5acf46ba6890B8536420F4900AC9BC45Df4764"
sepoliaBLSOperatorStateRetrieverAddress = "0x22478d082E9edaDc2baE8443E4aC9473F6E047Ff"
sepoliaEigenDADirectory = "0x9620dC4B3564198554e4D2b06dEFB7A369D90257"
)

var (
Expand Down Expand Up @@ -263,6 +266,7 @@ func BuildTestSuiteConfig(testCfg TestConfig) config.AppConfig {
var certVerifierAddress string
var svcManagerAddress string
var blsOperatorStateRetrieverAddress string
var eigenDADirectory string
switch testCfg.Backend {
case MemstoreBackend:
break // no need to set these fields for local tests
Expand All @@ -271,16 +275,19 @@ func BuildTestSuiteConfig(testCfg TestConfig) config.AppConfig {
certVerifierAddress = preprodCertVerifierAddress
svcManagerAddress = preprodSvcManagerAddress
blsOperatorStateRetrieverAddress = preprodBLSOperatorStateRetrieverAddress
eigenDADirectory = preprodEigenDADirectory
case TestnetBackend:
disperserHostname = disperserTestnetHostname
certVerifierAddress = testnetCertVerifierAddress
svcManagerAddress = testnetSvcManagerAddress
blsOperatorStateRetrieverAddress = testnetBLSOperatorStateRetrieverAddress
eigenDADirectory = testnetEigenDADirectory
case SepoliaBackend:
disperserHostname = disperserSepoliaHostname
certVerifierAddress = sepoliaCertVerifierAddress
svcManagerAddress = sepoliaSvcManagerAddress
blsOperatorStateRetrieverAddress = sepoliaBLSOperatorStateRetrieverAddress
eigenDADirectory = sepoliaEigenDADirectory
default:
panic("Unsupported backend")
}
Expand Down Expand Up @@ -353,6 +360,7 @@ func BuildTestSuiteConfig(testCfg TestConfig) config.AppConfig {
EigenDACertVerifierOrRouterAddress: certVerifierAddress,
BLSOperatorStateRetrieverAddr: blsOperatorStateRetrieverAddress,
EigenDAServiceManagerAddr: svcManagerAddress,
EigenDADirectory: eigenDADirectory,
RetrieversToEnable: testCfg.Retrievers,
},
}
Expand Down
Loading
Loading