-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Description:
To fully support the new v1.10.0 cluster‐definition schema in our SDK (and downstream FE/LP), we need to establish sensible defaults and enforce validation rules on the following fields:
- compounding
- Default: true
- Allowed values: true or false
- Note: Controls whether validator deposits are “compounded” (0x02) or simple (0x01), which in turn affects deposit defaults and validator type.
- target_gas_limit
- Default: 36000000
- Validation: Must be a positive integer (> 0). [might not need since protocol already checks with uint?]
3.consensus_protocol
- Default: "" (empty string)
- Allowed values: "" or "qbft"
- Note: We only support “qbft” for now; any other input should be rejected.
- deposit_amounts
- Default: null
- Validation:
- If compounding === false (simple validators):
- Must be either null or an array containing any subset of:
- ["1000000000", "32000000000"]
- (Corresponds to [1 ETH, 32 ETH] in wei-scale strings)
- If compounding === true (compounded validators):
- Must be either null or an array containing any subset of:
- ["1000000000", "8000000000", "32000000000", "256000000000"]
- (Corresponds to [1 ETH, 8 ETH, 32 ETH, 256 ETH])
Acceptance Criteria:
- SDK definitions default compounding to true and reject non-boolean inputs.
- SDK defaults target_gas_limit to 36000000; rejects zero or negative values.
- SDK defaults consensus_protocol to ""; rejects any string other than "" or "qbft".
- SDK defaults deposit_amounts to null; validates array entries against the correct set based on compounding.
- Unit tests covering each field’s default and validation behavior.
- Documentation updated (FE/LP README or spec) to reflect the new defaults and validation logic.