Common configuration
SignerConfig
The SignerConfig struct is the primary configuration object used to initialize a signer. It’s defined in the go_signer library and specifies how and where cryptographic signing operations are performed.
The configuration supports multiple signer types. To use it, set the desired signer type in the Method field. The remaining configuration parameters will vary depending on the selected method.
The main methods are:
Keystore (local)
Use this method to sign with a local keystore file.
| Name | Type | Example | Description |
|---|---|---|---|
| Method | string | local | Must be local |
| Path | string | /opt/private_key.kestore | full path to the keystore |
| Password | string | xdP6G8gV9PYs | password to unlock the keystore |
Example:
[AggSender]
AggsenderPrivateKey = { Method="local", Path="/opt/private_key.kestore", Password="xdP6G8gV9PYs" }
Google Cloud KMS (GCP)
Use this method to sign using the Google Cloud KMS infrastructure.
| Name | Type | Example | Description |
|---|---|---|---|
| Method | string | GCP | Must be GCP |
| KeyName | string | projects/your-prj-name/locations/your_location/keyRings/name_of_your_keyring/cryptoKeys/key-name/cryptoKeyVersions/version | id of the key in Google Cloud |
Example:
[AggSender]
AggsenderPrivateKey = { Method="GCP", KeyName="projects/your-prj-name/locations/your_location/keyRings/name_of_your_keyring/cryptoKeys/key-name/cryptoKeyVersions/version"}
Amazon Web Services KMS (AWS)
Use this method to sign using the AWS KMS infrastructure. The key type must be ECC_SECG_P256K1 to ensure compatibility.
| Name | Type | Example | Description |
|---|---|---|---|
| Method | string | AWS | Must be AWS |
| KeyName | string | a47c263b-6575-4835-8721-af0bbb97XXXX | id of the key in AWS |
Example:
[AggSender]
AggsenderPrivateKey = { Method="AWS", KeyName="a47c263b-6575-4835-8721-af0bbb97XXXX"}
Others
Additional signing methods are available. For a complete list and detailed configuration options, please refer to the go_signer library documentation (v0.0.7)
ClientConfig
The ClientConfig structure configures the gRPC client connection. It includes the following fields:
| Field Name | Type | Description |
|---|---|---|
| URL | string | The URL of the gRPC server |
| MinConnectTimeout | types.Duration | Minimum time to wait for a connection to be established |
| RequestTimeout | types.Duration | Timeout for individual requests |
| UseTLS | bool | Whether to use TLS for the gRPC connection |
| Retry | *RetryConfig | Retry configuration for failed requests |
RetryConfig
The RetryConfig structure configures the retry behavior for failed gRPC requests:
| Field Name | Type | Description |
|---|---|---|
| InitialBackoff | types.Duration | Initial delay before retrying a request |
| MaxBackoff | types.Duration | Maximum backoff duration for retries |
| BackoffMultiplier | float64 | Multiplier for the backoff duration |
| MaxAttempts | int | Maximum number of retries for a request |
| Excluded | []Method | List of methods excluded from retry policies |
Example:
[AggSender]
[AggSender.AgglayerClient]
URL = "http://localhost:9000"
MinConnectTimeout = "5s"
RequestTimeout = "300s"
UseTLS = false
[AggSender.AgglayerClient.Retry]
InitialBackoff = "1s"
MaxBackoff = "10s"
BackoffMultiplier = 2.0
MaxAttempts = 16
Method
The Method type represents a gRPC method configuration with the following fields:
| Field Name | Type | Description |
|---|---|---|
| ServiceName | string | The gRPC service name (including package) |
| MethodName | string | The specific gRPC function name (optional) |
This type is used to specify methods that should be excluded from retry policies. The ServiceName field is required and should include both the package and service name.
Example:
[AggSender]
[AggSender.AgglayerClient]
[AggSender.AgglayerClient.Retry]
Excluded = [
{ Service = "agglayer.Agglayer", Method = "SubmitCertificate" },
{ Service = "agglayer.Agglayer", Method = "GetStatus" }
]
RateLimitConfig
The RateLimitConfig structure configures rate limiting behavior. If either NumRequests or Interval is set to 0, rate limiting is disabled.
| Field Name | Type | Description |
|---|---|---|
| NumRequests | int | Maximum number of requests allowed within the interval |
| Interval | types.Duration | Time window for rate limiting |
Example:
[AggSender]
[AggSender.MaxSubmitCertificateRate]
NumRequests = 20
Interval = "1h"
When rate limiting is enabled, if the number of requests exceeds NumRequests within the specified Interval, the system will wait until the next interval before allowing more requests. This helps prevent overwhelming the system with too many requests in a short period.
RESTConfig
RESTConfig configures a shared Gin-based HTTP server. It backs the REST sections in the config: [PublicREST],
[AdminREST], and the proxy’s [REST].
| Field Name | Type | Description |
|---|---|---|
| Host | string | Hostname or IP address the REST service listens on |
| Port | int | Port number the REST service is accessible on |
| ReadTimeout | types.Duration | HTTP server read timeout |
| WriteTimeout | types.Duration | HTTP server write timeout |
| MaxRequestsPerIPAndSecond | float64 | Unused; kept for config compatibility. See below |
| CORS | CORSConfig | Cross-Origin Resource Sharing settings for this REST service. See below |
MaxRequestsPerIPAndSecond is not enforced: aggkit does not rate-limit requests in-process. Its default is 0
(unlimited). If you need per-IP request throttling, apply it at the fronting reverse proxy / API gateway / ingress —
that is also where it is most effective, since a service sitting behind a proxy typically sees every client as the
proxy’s single IP, making in-process per-IP limiting ineffective anyway.
CORSConfig
CORSConfig configures Cross-Origin Resource Sharing headers, so the REST service can be called from a
browser-based client hosted on a different origin. Disabled by default, which preserves the current behavior (no
CORS headers, so browsers block cross-origin requests).
| Field Name | Type | Description |
|---|---|---|
| Enabled | bool | Turns on CORS header handling |
| AllowedOrigins | []string | Origins allowed to make cross-origin requests. "*" allows any origin; empty denies every origin once Enabled is true |
| AllowedMethods | []string | HTTP methods allowed for cross-origin requests |
| AllowedHeaders | []string | Request headers allowed for cross-origin requests |
| AllowCredentials | bool | Allows cookies / HTTP auth on cross-origin requests. When true, the request’s Origin is reflected back instead of *, since the CORS spec forbids combining credentials with a wildcard origin |
| MaxAge | types.Duration | How long browsers may cache a preflight (OPTIONS) response. 0 (default) omits the header |
Example, enabling CORS for the proxy’s [REST] section for a frontend hosted at https://example.com:
[REST.CORS]
Enabled = true
AllowedOrigins = ["https://example.com"]
AllowedMethods = ["GET", "POST", "OPTIONS"]
AllowedHeaders = ["Content-Type", "Authorization"]
AllowCredentials = false
MaxAge = "12h"
Note that the [RPC] section is not a RESTConfig: it is the JSON-RPC server config from
github.com/0xPolygon/cdk-rpc, whose MaxRequestsPerIPAndSecond is enforced (via tollbooth). There, 0 does
not mean unlimited — tollbooth.NewLimiter(0, ...) produces a limiter with a burst of 1 and no refill, i.e. one
request per IP ever. Its default stays 10.
RPCClientConfig
RPCClientConfig configures the JSON-RPC client used to connect to Ethereum nodes. It is used in multiple places, notably [L1NetworkConfig.RPC] (L1 node) and [Common.L2RPC] (L2 node).
| Field | Type | Default | Description |
|---|---|---|---|
URL | string | — | JSON-RPC endpoint URL |
Mode | string | "" | Client mode: "" or "basic" for standard nodes, "op" for Optimism nodes |
HashFromJSON | bool | false | When true, fetches block hashes via JSON-RPC (eth_getBlockByNumber). When false, computes them locally from the RLP-encoded header (go-ethereum default). Enable this for nodes where RLP hashing does not match the canonical block hash |
BatchBlockHeaderRetrieval | bool | true | When true, uses JSON-RPC batch requests to fetch block headers in bulk (faster). Disable if the node does not support batch calls |
RetryMode | string | "backoff" | Retry strategy: "backoff" for exponential backoff, "delays" for fixed delay list, "" for no retries |
MaxRetries | int | 5 | Maximum number of retry attempts |
InitialBackoff | duration | 5s | Initial wait time before the first retry (backoff mode) |
MaxBackoff | duration | 60s | Maximum wait time between retries (backoff mode) |
BackoffMultiplier | float64 | 2.0 | Multiplier applied to the backoff duration on each retry |
Delays | []duration | [] | Explicit list of wait times for each retry attempt (delays mode) |
Example:
[L1NetworkConfig.RPC]
URL = "http://localhost:8545"
Mode = "basic"
HashFromJSON = false
BatchBlockHeaderRetrieval = true
RetryMode = "backoff"
MaxRetries = 5
InitialBackoff = "5s"
MaxBackoff = "60s"
BackoffMultiplier = 2.0
[Common.L2RPC]
URL = "http://localhost:8123"
Mode = "basic"
HashFromJSON = true
BatchBlockHeaderRetrieval = true
RetryMode = "delays"
MaxRetries = 6
Delays = ["1s", "2s", "5s", "10s", "30s", "60s"]
AutoClaim
AutoClaim configures the optional Auto Claim runtime, which automates both L1-to-L2 and L2-to-Lx (L2-to-L1,
L2-to-L2) bridge claims. It is disabled by default. To enable it, select the autoclaim component (there is no
separate enable flag), configure storage, and add at least one enabled EVM claimer for the destination network.
Auto Claim requires l1bridgesync and l1infotreesync when enabled. [AutoClaim.BridgeServiceFinder].RollupManagerAddr
is required whenever [AutoClaim.L2ToLxBridgeDetector].Enabled = true or any enabled claimer has an L2
destination (NetworkID != 0), in either direction — the finder resolves rollup bridge service URLs both as
sources (bridge discovery and claim-proof fetch) and as destinations (the per-claimer GER-injection readiness gate,
which replaced the previous per-claimer l2gersync instance). There are no longer per-claimer BlockFinality /
InitialBlockNum config keys, since claimers no longer run their own GER syncer. The optional REST API uses
/autoclaim/v1 for request inspection and manual approvals.
See Auto Claim Service for the complete configuration table, policy behavior, lifecycle, and API workflow.