TL;DR: DFINITY is happy to announce significant throughput improvements for threshold signing, and would like to hear more about your use-cases.
Background
The Internet Computer Protocol currently implements a threshold signing service with four different schemes:
This service allows canisters to:
- obtain their own public keys (wallet addresses),
- compute signatures on arbitrary messages,
- derive (encrypted) keys.
Each threshold scheme relies on a master private key, which is securely secret-shared among all nodes of a subnet such that it is never fully revealed to anyone. Two sets of master keys are currently deployed this way:
test_key1on signing test subnetfuqsr(13 nodes)key1on fiduciary signing subnetpzp6e(34 nodes)
Previous Throughput Limits
Until recently, the signature throughput of the fiduciary signing subnet was limited to at most:
- 0.5 sig/s for tECDSA
- 1.1 sig/s for tSchnorr
- 5 sig/s for vetKeys
While these numbers were sufficient for existing usage, they made the implementation of certain use-cases more challenging. This especially applied to DeFi applications where activity often occurs in bursts, and single transactions may result in many signature requests. For example, a single Bitcoin transaction may involve signing multiple inputs or coordinating multi-signatures approvals.
Improvements
Over the last couple months, the community adopted many different changes across multiple layers of the replica code, with the goal to improve the throughput of the IC’s threshold signing service. Among others, these changes included:
- Implementing “hashes-in-blocks” for IDKG dealings (39c83f)
- In-memory canister secret key store (9349c4)
- Multi-threading for cryptographic operations (2fa6f1)
- Moving expensive computation out of critical paths (2e94a7)
- Many smaller optimizations in inter-process communication and cryptographic primitives
Additionally, pre-signature artifacts that are required to serve signatures requests, are now stored in the subnet’s replicated state (76a5fa). In contrast to storing these artifacts as part of consensus blocks, where space is limited, this change enables the subnet to generate significantly more pre-signatures in advance (in the order of thousands).
Creating pre-signatures is the main performance bottleneck of the threshold signing protocol. Therefore, generating more of them in advance during times of lower load, allows the subnet to be better prepared when handling large bursts of signature requests.
New Throughput Limits
Thanks to these changes, the sustained throughput limit of subnets with a configuration optimized for high signature load has increased by a factor of 10x and more. This improvement applies to an ongoing stream of signature requests when no pre-signatures are available.
While there are pre-signatures available, such a subnet can additionally handle load spikes in excess of 100 signatures per second (maximum throughput), until all available pre-signatures are consumed.
As usual, these limits apply per subnet, meaning they may be scaled horizontally by adding more signing subnets.
Fig 1. Signature throughput before improvements (first bar), sustained signature throughput after improvements (second bar), maximum burst throughput after improvements (third bar), for all schemes. There is no third bar for VetKeys, as it doesn’t use pre-signatures.
Changes to Mainnet Parameters
As a consequence of the new limits, the community adopted proposal 140289, which represents a conservative parameter increase for the fiduciary signing subnet pzp6e. By increasing the number of pre-signatures to be created in advance from 5 to 100, canisters may expect to see an improved maximum signature throughput of around:
- 3.5 sig/s for tECDSA,
- 6.5 sig/s for tSchnorr,
- 18 sig/s for vetKeys.
Next Steps
DFINITY will continue to monitor the usage and throughput of the signing service, and propose further parameter increases as demand rises and new use-cases appear. If necessary, these parameter changes could bring the subnet even closer to the new maximum throughput limits summarized in the graphic above.
Finally, if your application is expected to require a signature throughput that is higher than currently configured, please feel welcomed to use this thread as a platform to describe your use-case, which may then serve as a basis for further parameter increases.
