Compare commits

...

2 Commits

Author SHA1 Message Date
Jędrzej Stuczyński a0c29f1d17 changing dkg timings on migration 2023-12-13 09:34:18 +00:00
Jędrzej Stuczyński 7abfe27e57 HACK: change dealing storage keys 2023-12-13 09:21:03 +00:00
2 changed files with 25 additions and 6 deletions
+20 -1
View File
@@ -127,7 +127,26 @@ pub fn query(deps: Deps<'_>, _env: Env, msg: QueryMsg) -> Result<QueryResponse,
}
#[entry_point]
pub fn migrate(_deps: DepsMut<'_>, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
pub fn migrate(deps: DepsMut<'_>, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
let mut current_epoch = CURRENT_EPOCH.load(deps.storage)?;
current_epoch
.time_configuration
.public_key_submission_time_secs = 1200;
current_epoch.time_configuration.dealing_exchange_time_secs = 1200;
current_epoch
.time_configuration
.verification_key_submission_time_secs = 600;
current_epoch
.time_configuration
.verification_key_validation_time_secs = 600;
current_epoch
.time_configuration
.verification_key_finalization_time_secs = 600;
current_epoch.time_configuration.in_progress_time_secs = 60 * 60 * 24 * 365 * 10;
CURRENT_EPOCH.save(deps.storage, &current_epoch)?;
//
Ok(Default::default())
}
@@ -25,9 +25,9 @@ type DealingKey<'a> = &'a Addr;
// if TOTAL_DEALINGS is modified to anything other then current value (5), this part will also need
// to be modified
pub(crate) const DEALINGS_BYTES: [Map<'_, DealingKey<'_>, ContractSafeBytes>; TOTAL_DEALINGS] = [
Map::new("dbyt1"),
Map::new("dbyt2"),
Map::new("dbyt3"),
Map::new("dbyt4"),
Map::new("dbyt5"),
Map::new("dbyt1-tmp2"),
Map::new("dbyt2-tmp2"),
Map::new("dbyt3-tmp2"),
Map::new("dbyt4-tmp2"),
Map::new("dbyt5-tmp2"),
];