From 4fd8d86bda09b7da6bd1ea54d91a9b649b20e8f9 Mon Sep 17 00:00:00 2001 From: Nico Serrano Date: Mon, 24 Oct 2022 23:49:54 -0500 Subject: [PATCH 1/3] try_contribute(fix): add anotherContributionInProgress response --- apiSpec/sequencerApi.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/apiSpec/sequencerApi.yml b/apiSpec/sequencerApi.yml index e0133fe..fb4a7ca 100644 --- a/apiSpec/sequencerApi.yml +++ b/apiSpec/sequencerApi.yml @@ -77,11 +77,11 @@ paths: /contribution/abort: post: tags: - - Contribution + - Contribution summary: Cancel contribution attempt - description: | + description: | Indicates an error while contributing (e.g. an error when performing - crypto calculations). Clients should use this endpoint + crypto calculations). Clients should use this endpoint in the event of an unrecoverable error after contribution has started to allow other users to participate sooner. responses: @@ -114,7 +114,7 @@ paths: schema: oneOf: - $ref: '#/components/schemas/BatchContribution' - description: + description: User was selected for contribution. Use the returned contribution file to calculate participant's points and then post results to /contribute See contributionSchema.json for more detailed schema definition. - type: object @@ -122,6 +122,19 @@ paths: error: type: string enum: ["another contribution in progress"] + 200: + description: another contribution in progress + content: + application/json: + schema: + type: object + properties: + code: + type: string + enum: ["TryContributeError::AnotherContributionInProgress"] + message: + type: string + enum: ["another contribution in progress"] 400: description: rate limited content: From 9563f84fe9ad067efe96ab6a2dc58cf61000c11c Mon Sep 17 00:00:00 2001 From: Nico Serrano Date: Thu, 3 Nov 2022 11:13:15 -0500 Subject: [PATCH 2/3] docs(fix): include bls attr in initial contribution --- initialContribution.json | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/initialContribution.json b/initialContribution.json index ba37bd2..eb10029 100644 --- a/initialContribution.json +++ b/initialContribution.json @@ -4168,10 +4168,11 @@ "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" - + ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", + "blsSignature": "" }, { "numG1Powers": 8192, @@ -12437,10 +12438,11 @@ "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" - + ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", + "blsSignature": "" }, { "numG1Powers": 16384, @@ -28899,10 +28901,11 @@ "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" - + ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", + "blsSignature": "" }, { "numG1Powers": 32768, @@ -61746,10 +61749,11 @@ "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" - + ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", + "blsSignature": "" } ] } \ No newline at end of file From de0b4b7738aa8db8077710de78f26f683763b2b9 Mon Sep 17 00:00:00 2001 From: Nico Serrano Date: Thu, 3 Nov 2022 11:53:13 -0500 Subject: [PATCH 3/3] docs(fix): bls signature in camel case --- apiSpec/contributionSchema.json | 14 ++++++-------- initialContribution.json | 12 ++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/apiSpec/contributionSchema.json b/apiSpec/contributionSchema.json index 1521216..8f05a75 100644 --- a/apiSpec/contributionSchema.json +++ b/apiSpec/contributionSchema.json @@ -71,7 +71,7 @@ "potPubkey": { "type": "string" }, - "bls_signature": { + "blsSignature": { "anyOf": [ {"$ref": "#/$defs/G1Point"}, {"$ref": "#/$defs/emptyString"} @@ -125,7 +125,7 @@ "potPubkey": { "type": "string" }, - "bls_signature": { + "blsSignature": { "anyOf": [ {"$ref": "#/$defs/G1Point"}, {"$ref": "#/$defs/emptyString"} @@ -175,12 +175,11 @@ "G1Powers", "G2Powers" ] - } - , + }, "potPubkey": { "type": "string" }, - "bls_signature": { + "blsSignature": { "anyOf": [ {"$ref": "#/$defs/G1Point"}, {"$ref": "#/$defs/emptyString"} @@ -230,12 +229,11 @@ "G1Powers", "G2Powers" ] - } - , + }, "potPubkey": { "type": "string" }, - "bls_signature": { + "blsSignature": { "anyOf": [ {"$ref": "#/$defs/G1Point"}, {"$ref": "#/$defs/emptyString"} diff --git a/initialContribution.json b/initialContribution.json index eb10029..57a08b2 100644 --- a/initialContribution.json +++ b/initialContribution.json @@ -4171,8 +4171,7 @@ ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", - "blsSignature": "" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" }, { "numG1Powers": 8192, @@ -12441,8 +12440,7 @@ ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", - "blsSignature": "" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" }, { "numG1Powers": 16384, @@ -28904,8 +28902,7 @@ ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", - "blsSignature": "" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" }, { "numG1Powers": 32768, @@ -61752,8 +61749,7 @@ ] }, - "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8", - "blsSignature": "" + "potPubkey": "0x93e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7e024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8" } ] } \ No newline at end of file