Skip to content

Commit

Permalink
chore: stack for multiple cycles to reduce pox activation flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Dec 21, 2023
1 parent eb4b12f commit 74ce0fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ x-common-vars:
- &BITCOIN_RPC_USER btc
- &BITCOIN_RPC_PASS btc
- &MINE_INTERVAL ${MINE_INTERVAL:-0.5s}
- &MINE_INTERVAL_EPOCH3 ${MINE_INTERVAL_EPOCH3:-60s}
- &MINE_INTERVAL_EPOCH3 ${MINE_INTERVAL_EPOCH3:-600s} # 10 minute bitcoin block times in epoch 3
- &STACKS_20_HEIGHT ${STACKS_20_HEIGHT:-101}
- &STACKS_2_05_HEIGHT ${STACKS_2_05_HEIGHT:-102}
- &STACKS_21_HEIGHT ${STACKS_21_HEIGHT:-103}
Expand Down Expand Up @@ -160,6 +160,7 @@ services:
environment:
STACKS_CORE_RPC_HOST: stacks-node
STACKS_CORE_RPC_PORT: 20443
STACKING_CYCLES: 2
STACKING_KEYS: 08c14a1eada0dd42b667b40f59f7c8dedb12113613448dc04980aea20b268ddb01,ce109fee08860bb16337c76647dcbc02df0c06b455dd69bcf30af74d4eedd19301,e75dcb66f84287eaf347955e94fa04337298dbd95aa0dbb985771104ef1913db01
depends_on:
- stacks-node
Expand Down
3 changes: 2 additions & 1 deletion stacking/stacking.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { getPublicKeyFromPrivate, publicKeyToBtcAddress } = require('@stacks/encr

const stackingInterval = process.env.STACKING_INTERVAL ?? 2;
const postTxWait = process.env.POST_TX_WAIT ?? 10;
const stackingCycles = process.env.STACKING_CYCLES ?? 1;
const url = `http://${process.env.STACKS_CORE_RPC_HOST}:${process.env.STACKS_CORE_RPC_PORT}`;
const network = new StacksTestnet({ url });

Expand Down Expand Up @@ -49,7 +50,7 @@ async function run() {
privateKey: account.privKey,
amountMicroStx: minStx,
burnBlockHeight: poxInfo.current_burnchain_block_height,
cycles: 1,
cycles: stackingCycles,
fee: 1000,
};
console.log('Stacking with args:', { addr: account.stxAddress, ...stackingArgs });
Expand Down

0 comments on commit 74ce0fb

Please sign in to comment.