Skip to content

Commit 5e850d1

Browse files
authored
Feature/node 4947 set default keyset on contract deployment (#82)
* set default realm config in the deploy.ts, and remove from test builder in node code ;-) * prettier! * switch function name.... which makes me wonder if my test executed! * ABI stalensss * add CI debbugging. * Reset all defaults for realm #1
1 parent 44407fd commit 5e850d1

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

blockchain/contracts/scripts/deploy_lit_node_contracts.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,24 @@ async function deployLitNodeContracts(deployNodeConfig) {
538538
tx = await stakingContract.addRealm();
539539
await tx.wait();
540540

541+
// Ensure the default keyset is set
542+
let realmConfig = {
543+
maxConcurrentRequests: 1000,
544+
maxPresignCount: 25,
545+
minPresignCount: 10,
546+
peerCheckingIntervalSecs: 7,
547+
maxPresignConcurrency: 2,
548+
rpcHealthcheckEnabled: true,
549+
minEpochForRewards: 3,
550+
permittedValidatorsOn: false,
551+
defaultKeySet: DEFAULT_KEY_SET_NAME,
552+
};
553+
// 1000n, 25n, 10n,
554+
// 7n, 2n, true,
555+
// 3n, false, ''
556+
tx = await stakingContract.setRealmConfig(1, realmConfig);
557+
await tx.wait();
558+
541559
// set the default keyset config
542560
let defaultKeysetConfig = {
543561
identifier: DEFAULT_KEY_SET_NAME,

rust/lit-node/lit-node-testnet/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ impl TestSetupBuilder {
269269
.epoch_length(self.epoch_length)
270270
.max_presign_count_u64(self.max_presign_count)
271271
.min_presign_count_u64(self.min_presign_count)
272-
.default_key_set(Some(DEFAULT_KEY_SET_NAME.to_string()))
273272
.build();
274273

275274
info!(

rust/lit-node/lit-node-testnet/src/testnet/datil/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ impl DatilTestnet {
171171
let client = Arc::new(SignerMiddleware::new(self.provider.clone(), node_wallet));
172172

173173
let local_pubkey_router = PubkeyRouter::new(pubkey_router_address, client);
174-
info!("Voting for root keys on the Datil chain for staker #{} with node address {:?}", idx + 1, node_account.node_address);
174+
info!(
175+
"Voting for root keys on the Datil chain for staker #{} with node address {:?}",
176+
idx + 1,
177+
node_account.node_address
178+
);
175179
let func = local_pubkey_router.vote_for_root_keys(staking_address, root_keys.clone());
176180
let tx = func.send().await.unwrap();
177181
let _receipt = tx.await.unwrap();

0 commit comments

Comments
 (0)