mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
mpc: drop Ringtail identifiers — wire API renamed to Corona
The two MPC files that still carried Ringtail names: cmd/mpcd/main.go — comment ref to luxfi/ringtail pkg/api/handlers_kms.go — ValidatorKeySet wire schema handlers_kms.go renames: ValidatorKeySet.RingtailWalletID → CoronaWalletID ValidatorKeySet.RingtailPublicKey → CoronaPublicKey JSON tags ringtailWalletId/PubKey → coronaWalletId/PubKey local `ringtailWalletID` and the per-validator suffix "validator-<id>-ringtail" → "validator-<id>-corona" router switch `case "ringtail":` → `case "corona":` cmd/mpcd/main.go: comment "luxfi/corona and luxfi/ringtail" was collapsed to just "luxfi/corona" — the dispatcher's not-yet-impl stub now references only the live R-LWE library. Wire break, no compat layer (forwards-perfection policy): KMS callers must re-issue requests with the new field names. Build: go build ./... PASS. Tests: pkg/api PASS 1.374s.
This commit is contained in:
+1
-1
@@ -785,7 +785,7 @@ func runNodeConsensus(ctx context.Context, c *cli.Command) error {
|
||||
// consumed by teleport/mpc and any other client that speaks the
|
||||
// threshold bus. Pulsar/Corona slots return a typed
|
||||
// "not yet implemented" error pending stable wire encodings in
|
||||
// luxfi/corona and luxfi/ringtail (Red HIGH B2).
|
||||
// luxfi/corona (Red HIGH B2).
|
||||
//
|
||||
// The dispatcher carries zero protocol policy on purpose: profile
|
||||
// gating and audit live on the API surface above. Auth and bind
|
||||
|
||||
@@ -562,6 +562,7 @@ github.com/luxfi/protocol v0.0.2/go.mod h1:Yjn2VRwn5PXim0+JTalAyrVG6YbmuSnYOfeUX
|
||||
github.com/luxfi/pubsub v1.0.0/go.mod h1:lCVBPBK/fhD0Ffg57E9R44CEI6Bo1fqb9ISJrBlj4ug=
|
||||
github.com/luxfi/qzmq v0.1.4/go.mod h1:PxxnNCYUKvY/lVfPh2q84niDBlOLxkCbfN0h3oSh1+U=
|
||||
github.com/luxfi/resource v0.0.1/go.mod h1:wWpZktciYwIi6RNqA+fHwzmPrUJa7PRX7urfwT+spRE=
|
||||
github.com/luxfi/ringtail v0.2.0/go.mod h1:SZ+aDLUdfSAtaTRaaYzeDZ5DNQiLaOCelSaIGjL21R0=
|
||||
github.com/luxfi/rpc v1.0.0/go.mod h1:dhxzM5rFqNpEOOHB7+8YBQ9d/V4haa6/id9AQTIIJvQ=
|
||||
github.com/luxfi/runtime v1.0.0/go.mod h1:lCoz8vCfR4ZU0GNxe0VdHEdq8G0W7rKzQpTnXvew/dM=
|
||||
github.com/luxfi/runtime v1.0.1/go.mod h1:2hBKjzbEeE4dzrhUKH8dqkRgLEyiXz6GmuVusy3vJMs=
|
||||
|
||||
+12
-12
@@ -14,13 +14,13 @@ import (
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
// ValidatorKeySet holds MPC wallet references for a validator's BLS and Ringtail keys.
|
||||
// ValidatorKeySet holds MPC wallet references for a validator's BLS and Corona keys.
|
||||
type ValidatorKeySet struct {
|
||||
ValidatorID string `json:"validatorId"`
|
||||
BLSWalletID string `json:"blsWalletId"`
|
||||
RingtailWalletID string `json:"ringtailWalletId"`
|
||||
CoronaWalletID string `json:"coronaWalletId"`
|
||||
BLSPublicKey string `json:"blsPublicKey"`
|
||||
RingtailPublicKey string `json:"ringtailPublicKey"`
|
||||
CoronaPublicKey string `json:"coronaPublicKey"`
|
||||
Threshold int `json:"threshold"`
|
||||
Parties int `json:"parties"`
|
||||
Status string `json:"status"`
|
||||
@@ -100,8 +100,8 @@ func (s *Server) handleKMSGenerate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
ringtailWalletID := fmt.Sprintf("validator-%s-ringtail", req.ValidatorID)
|
||||
ringtailResult, err := s.mpc.TriggerKeygen(orgID, ringtailWalletID)
|
||||
coronaWalletID := fmt.Sprintf("validator-%s-corona", req.ValidatorID)
|
||||
coronaResult, err := s.mpc.TriggerKeygen(orgID, coronaWalletID)
|
||||
if err != nil {
|
||||
writeError(w, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
@@ -111,9 +111,9 @@ func (s *Server) handleKMSGenerate(w http.ResponseWriter, r *http.Request) {
|
||||
ks := &ValidatorKeySet{
|
||||
ValidatorID: req.ValidatorID,
|
||||
BLSWalletID: blsResult.WalletID,
|
||||
RingtailWalletID: ringtailResult.WalletID,
|
||||
CoronaWalletID: coronaResult.WalletID,
|
||||
BLSPublicKey: blsResult.ECDSAPubKey,
|
||||
RingtailPublicKey: ringtailResult.EDDSAPubKey,
|
||||
CoronaPublicKey: coronaResult.EDDSAPubKey,
|
||||
Threshold: req.Threshold,
|
||||
Parties: req.Parties,
|
||||
Status: "active",
|
||||
@@ -188,10 +188,10 @@ func (s *Server) handleKMSSign(w http.ResponseWriter, r *http.Request) {
|
||||
switch req.KeyType {
|
||||
case "bls":
|
||||
walletID = ks.BLSWalletID
|
||||
case "ringtail":
|
||||
walletID = ks.RingtailWalletID
|
||||
case "corona":
|
||||
walletID = ks.CoronaWalletID
|
||||
default:
|
||||
writeError(w, http.StatusBadRequest, "key_type must be 'bls' or 'ringtail'")
|
||||
writeError(w, http.StatusBadRequest, "key_type must be 'bls' or 'corona'")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -233,8 +233,8 @@ func (s *Server) handleKMSRotate(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusInternalServerError, fmt.Sprintf("bls reshare: %v", err))
|
||||
return
|
||||
}
|
||||
if err := s.mpc.TriggerReshare(orgID, ks.RingtailWalletID, req.NewThreshold, req.NewParticipants); err != nil {
|
||||
writeError(w, http.StatusInternalServerError, fmt.Sprintf("ringtail reshare: %v", err))
|
||||
if err := s.mpc.TriggerReshare(orgID, ks.CoronaWalletID, req.NewThreshold, req.NewParticipants); err != nil {
|
||||
writeError(w, http.StatusInternalServerError, fmt.Sprintf("corona reshare: %v", err))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user