v0.1.0 Migration guide
v0.1.0
has some breaking changes and will require to setup the BLS signer from scratch.
High Level Changes
- API spec has been changed. Please refer to cerberus-api
- New requirement for a postgresDB for persistence. So users will need to have a postgres DB, either hosted or use the docker compose file to setup a fresh DB (If you were testing using a version of cerberus with DB, you might need to start a fresh DB instance and re-import keys)
High level steps
- If you are using docker get the latest Docker compose file (if using the postgres from the setup)
- Import the keys using the ImportKey endpoint
grpcurl -plaintext -d '{"privateKey": "<sk>", "password": "password"}' localhost:50051 keymanager.v1.KeyManager/ImportKey
It will respond back with
{
"publicKeyG1": "<g1-pub-key>",
"apiKey": "<unique-api-key>"
}
- Use this API key in every signing request
grpcurl -plaintext -H 'authorization: <unique-api-key>' -d '{"public_key_g1": "<g1-pub-key>", "password": "<password>", "data": "SGVsbG8sIFdvcmxkIQ=="}' localhost:50051 signer.v1.Signer/SignGeneric
Without this header (or without correct api key), you won’t be able to sign any request
Every signer also has a way to spin up an admin API on different port which should only be accessible by super admin. The APIs in those admin service should help you in locking and unlocking keys and rotation the API key which is mapped to a g1 pub key. Please make sure to NOT expose this port to public or to any EigenDA nodes
EigenSDK
The latest EigenSDK has a module which abstract everything away - https://github.com/Layr-Labs/eigensdk-go/tree/dev/signer
This is a separate module which can be used if you want to use it.
EigenDA
The latest EigenDA release will have support this version of Cerberus. So please upgrade if you are using it.
If you are using eigenda with existing version of Cerberus, there are two path on how you can upgrade
1. Setup a new instance (Recommended)
Since this is a breaking change. You can setup a new instance of cerberus and then import the key again. Then once you update eigenda and the new env vars you can just point to new instance and run eigenda
2. Using Existing instance
2.1 Switch to Local signer
If you don’t want to disrupt eigenda signing, then switch to local signer (make sure to have key locally as we used to do it ) and then keep running eigenda. Upgrade the Cerberus instance, reimport the key and then point eigenda back to remote signer and enable remote signer
2.2 Just upgrade the remote signer
This way might lead to little downtime. Just upgrade the signer and import the key and then update eigenda envs for api key and restart eigenda
What's Changed
- feat: add endpoint to get g1 and g2 pubkeys by @shrimalmadhur in Layr-Labs/cerberus-api#8
- feat: add g1 point sign api by @shrimalmadhur in Layr-Labs/cerberus-api#9
- feat: add api key and admin API by @shrimalmadhur in Layr-Labs/cerberus-api#7
- docs: update readme by @shrimalmadhur in Layr-Labs/cerberus-api#10
Full Changelog: Layr-Labs/cerberus-api@v0.0.1...v0.1.0
What's Changed
- chore(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by @dependabot in #13
- Image fix by @RonTuretzky in #14
- feat: add google secret manager as backend by @shrimalmadhur in #15
- chore: remove go mod tidy from docker build by @shrimalmadhur in #16
- feat: add postgres db to store keys metadata by @shrimalmadhur in #24
- feat: implement g1 sign api by @shrimalmadhur in #25
- feat: add api key for authz by @shrimalmadhur in #31
- Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.5 by @dependabot in #3
- chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.28.5 to 1.29.0 by @dependabot in #33
- chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.29.0 to 1.29.2 by @dependabot in #40
- docs: update readme by @shrimalmadhur in #41
New Contributors
- @dependabot made their first contribution in #13
- @RonTuretzky made their first contribution in #14
Changelog
- 621d517 docs: update readme (#41)
- 104a0bf chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.29.0 to 1.29.2 (#40)
- 0316cbb chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.28.5 to 1.29.0 (#33)
- 4aed786 Bump github.com/prometheus/client_golang from 1.20.3 to 1.20.5 (#3)
- 4cdf1cf feat: add api key for authz (#31)
- 6d0c13b feat: implement g1 sign api (#25)
- bd104ca feat: add postgres db to store keys metadata (#24)
- d5b380b chore: remove go mod tidy from docker build (#16)
- 5ce56d9 feat: add google secret manager as backend (#15)
- d1ebb95 fix: Image fix (#14)
- 6e97cec chore(deps): bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#13)
Full Changelog: v0.0.2...v0.1.0