removed 'SurpassedThreshold' message

This commit is contained in:
Jędrzej Stuczyński
2024-02-15 14:49:47 +00:00
parent da70ae70a5
commit b960dc8aaf
7 changed files with 140 additions and 39 deletions
@@ -39,13 +39,6 @@ pub trait DkgSigningClient {
.await
}
async fn surpass_threshold(&self, fee: Option<Fee>) -> Result<ExecuteResult, NyxdError> {
let req = DkgExecuteMsg::SurpassedThreshold {};
self.execute_dkg_contract(fee, req, "surpass DKG threshold".to_string(), vec![])
.await
}
async fn register_dealer(
&self,
bte_key: EncodedBTEPublicKeyWithProof,
@@ -191,8 +184,8 @@ mod tests {
} => client
.submit_dealing_metadata(dealing_index, chunks, resharing, None)
.ignore(),
DkgExecuteMsg::CommitDealingsChunk { chunk, resharing } => {
client.submit_dealing_chunk(chunk, resharing, None).ignore()
DkgExecuteMsg::CommitDealingsChunk { chunk } => {
client.submit_dealing_chunk(chunk, None).ignore()
}
DkgExecuteMsg::CommitVerificationKeyShare { share, resharing } => client
.submit_verification_key_share(share, resharing, None)
@@ -200,7 +193,6 @@ mod tests {
DkgExecuteMsg::VerifyVerificationKeyShare { owner, resharing } => client
.verify_verification_key_share(&owner.parse().unwrap(), resharing, None)
.ignore(),
DkgExecuteMsg::SurpassedThreshold {} => client.surpass_threshold(None).ignore(),
DkgExecuteMsg::AdvanceEpochState {} => client.advance_dkg_epoch_state(None).ignore(),
};
}
@@ -68,8 +68,6 @@ pub enum ExecuteMsg {
resharing: bool,
},
SurpassedThreshold {},
AdvanceEpochState {},
TriggerReset {},
@@ -242,19 +242,6 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"surpassed_threshold"
],
"properties": {
"surpassed_threshold": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
@@ -387,6 +374,35 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_registered_dealer"
],
"properties": {
"get_registered_dealer": {
"type": "object",
"required": [
"dealer_address"
],
"properties": {
"dealer_address": {
"type": "string"
},
"epoch_id": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
@@ -1594,6 +1610,46 @@
}
}
},
"get_registered_dealer": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RegisteredDealerDetails",
"type": "object",
"properties": {
"details": {
"anyOf": [
{
"$ref": "#/definitions/DealerRegistrationDetails"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"definitions": {
"DealerRegistrationDetails": {
"type": "object",
"required": [
"announce_address",
"bte_public_key_with_proof",
"ed25519_identity"
],
"properties": {
"announce_address": {
"type": "string"
},
"bte_public_key_with_proof": {
"type": "string"
},
"ed25519_identity": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"get_state": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "State",
@@ -153,19 +153,6 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"surpassed_threshold"
],
"properties": {
"surpassed_threshold": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
@@ -41,6 +41,35 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"get_registered_dealer"
],
"properties": {
"get_registered_dealer": {
"type": "object",
"required": [
"dealer_address"
],
"properties": {
"dealer_address": {
"type": "string"
},
"epoch_id": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
@@ -0,0 +1,40 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RegisteredDealerDetails",
"type": "object",
"properties": {
"details": {
"anyOf": [
{
"$ref": "#/definitions/DealerRegistrationDetails"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"definitions": {
"DealerRegistrationDetails": {
"type": "object",
"required": [
"announce_address",
"bte_public_key_with_proof",
"ed25519_identity"
],
"properties": {
"announce_address": {
"type": "string"
},
"bte_public_key_with_proof": {
"type": "string"
},
"ed25519_identity": {
"type": "string"
}
},
"additionalProperties": false
}
}
}
-1
View File
@@ -116,7 +116,6 @@ pub fn execute(
ExecuteMsg::VerifyVerificationKeyShare { owner, resharing } => {
try_verify_verification_key_share(deps, info, owner, resharing)
}
ExecuteMsg::SurpassedThreshold {} => todo!(),
ExecuteMsg::AdvanceEpochState {} => try_advance_epoch_state(deps, env),
ExecuteMsg::TriggerReset {} => try_trigger_reset(deps, env, info),
ExecuteMsg::TriggerResharing {} => try_trigger_resharing(deps, env, info),