- AUX Configs Seed
source set_env_vars.sh
./devops/exec/configStrategy.js --add-aux-configs
# Note: For staging and production follow help
- Activate AUX Configs
source set_env_vars.sh
./devops/exec/configStrategy.js --activate-configs --chain-id 2000 --group-id 1
- Create all SAAS Owned DDB Tables
source set_env_vars.sh
node executables/setup/aux/saasDdb.js --auxChainId 2000 --userShardNoStr 1,2 --deviceShardNoStr 1,2 --sessionShardNoStr 1,2 --balanceShardNoStr 1,2 --recoveryOwnerAddressShardNoStr 1,2
* All the parameters are mandatory parameters.
- Create Shared Aux DDB Tables (To be run ONLY FOR THE FIRST AUX CHAIN BEING SETUP)
source set_env_vars.sh
node executables/setup/blockScanner/initialSetup.js --chainId 2000
- Create Sharded Aux DDB Tables (Run the addChain service and pass all the necessary parameters):
source set_env_vars.sh
node executables/setup/blockScanner/addChain.js --chainId 2000 --networkId 2000 --blockShardCount 1 --transactionShardCount 1 --economyAddressShardCount 2
* Mandatory parameters: chainId, networkId
* Optional parameters (defaults to 1): blockShardCount, transactionShardCount, economyAddressShardCount
- Generate AUX addresses and Fund.
source set_env_vars.sh
node devops/exec/chainSetup.js --generate-aux-addresses --chain-id 2000
- [Only Development] Setup Aux GETH and necessary addresses.
source set_env_vars.sh
node tools/localSetup/aux/setupGeth.js --originChainId 3 --auxChainId 2000
- [Only Development] Start AUX GETH (with Zero Gas Price) with this script.
sh ~/openst-setup/bin/aux-2000/aux-chain-zeroGas-2000.sh
- Add sealer address.
NOTE: Use MyEtherWallet to export private key from keystore file. Visit the following link MyEtherWallet and select theKeystore / JSON File
option. Upload the keystore file from~/openst-setup/geth/aux-2000/keystore
folder. The unlock password istesttest
. Pass the address and privateKey (including 0x) in the command below.
And add it to tables using following script.
source set_env_vars.sh
node executables/setup/aux/addSealerAddress.js --auxChainId 2000 --sealerAddress '0xabc___' --sealerPrivateKey '0xabc___'
- Setup Aux Contracts
source set_env_vars.sh
node executables/setup/aux/contracts.js --originChainId 3 --auxChainId 2000
- Verifier script for auxiliary chain setup
- You can verify local chain setup and contract deployment using following script.
source set_env_vars.sh
node tools/verifiers/auxChainSetup.js --auxChainId 2000
- Mark simple token as active in stake currencies
source set_env_vars.sh
node executables/setup/origin/activateStakeCurrency.js --stakeCurrencySymbol "OST"
- Mark USDC as active in stake currencies
source set_env_vars.sh
node executables/setup/origin/activateStakeCurrency.js --stakeCurrencySymbol "USDC"
- [Only Development] Seed the cron processes which are associated to the aux chain using this script.
source set_env_vars.sh
node tools/localSetup/auxChainSpecificCronSeeder.js
- Run Aggregator. This is done only to initialize the queue.
source set_env_vars.sh
node executables/blockScanner/aggregator.js --cronProcessId 14
- Run Auxiliary Transaction Finalizer
source set_env_vars.sh
node executables/blockScanner/balanceSettler.js --cronProcessId 26
- Run Auxiliary Transaction Parser
source set_env_vars.sh
node executables/blockScanner/transactionParser.js --cronProcessId 12
- Run Auxiliary Block Parser
source set_env_vars.sh
node executables/blockScanner/blockParser.js --cronProcessId 11
- Run Auxiliary Block Finalizer
source set_env_vars.sh
node executables/blockScanner/finalizer.js --cronProcessId 13
//TODO: change amountToStake to amountToStakeInWei
source set_env_vars.sh
> node
// beneficiary -> masterInternalFunderKind
// facilitator -> masterInternalFunderKind
// stakerAddress -> masterInternalFunderKind
// firstTimeMint -> set this to 'true' if you are minting st prime for the first time [optional]
params = {
stepKind: 'stPrimeStakeAndMintInit',
taskStatus: 'taskReadyToStart',
clientId: 0,
chainId: 3,
topic: 'workflow.stPrimeStakeAndMint',
requestParams: {
stakerAddress: '0xb3bb6be32abfad59b647d5a40301084db2043f90',
originChainId: 3,
auxChainId: 2000,
sourceChainId: 3,
destinationChainId: 2000,
facilitator: '0xb3bb6be32abfad59b647d5a40301084db2043f90',
amountToStake: '1000000000000000000000000',
beneficiary: '0xb3bb6be32abfad59b647d5a40301084db2043f90',
firstTimeMint: true //[optional]
}
}
stPrimeRouterK = require('./lib/workflow/stakeAndMint/stPrime/Router')
stPrimeRouter = new stPrimeRouterK(params)
stPrimeRouter.perform().then(console.log).catch(function(err){console.log('err', err)})
- [HELP ONLY TO KNOW HOW TO START THE STUCK WORKFLOW]
params = {
stepKind: '', //step kind of row from where it need to restart
taskStatus: 'taskReadyToStart',
clientId: 0,
chainId: 3,
topic: 'workflow.stPrimeStakeAndMint',
workflowId: , //Workflow id
currentStepId: //Id of table from where it need to restart
}
- Stop geth running at zero gas price & Start AUX GETH (With Non Zero Gas Price) with this script.
sh ~/openst-setup/bin/aux-2000/aux-chain-2000.sh
source set_env_vars.sh
node executables/blockScanner/aggregator.js --cronProcessId 14
- Fund by sealer aux chain specific
source set_env_vars.sh
node executables/funding/bySealer/auxChainSpecific.js --cronProcessId 16
- Fund by master internal funder aux chain specific chain addresses
source set_env_vars.sh
node executables/funding/byMasterInternalFunder/auxChainSpecific/chainAddresses.js --cronProcessId 15
- Fund by master internal funder aux chain specific token funder addresses
source set_env_vars.sh
node executables/funding/byMasterInternalFunder/auxChainSpecific/tokenFunderAddresses.js --cronProcessId 20
- Fund by master internal funder aux chain specific inter chain facilitator addresses on origin chain.
source set_env_vars.sh
node executables/funding/byMasterInternalFunder/auxChainSpecific/interChainFacilitatorAddresses.js --cronProcessId 21
- Fund by token aux funder aux chain specific
source set_env_vars.sh
node executables/funding/byTokenAuxFunder/auxChainSpecific.js --cronProcessId 17
- Start Aux Workflow router factory
source set_env_vars.sh
node executables/auxWorkflowFactory.js --cronProcessId 24
- Start execute transaction cron process
source set_env_vars.sh
node executables/executeTransaction.js --cronProcessId 22
- Start origin to aux state root sync cron.
source set_env_vars.sh
node executables/stateRootSync/originToAux.js --cronProcessId 28
- Start aux to origin state root sync cron.
source set_env_vars.sh
node executables/stateRootSync/auxToOrigin.js --cronProcessId 29
source set_env_vars.sh
node executables/updatePricePoints.js --cronProcessId 18
source set_env_vars.sh
node executables/updatePricePoints.js --cronProcessId 19
source set_env_vars.sh
node executables/webhook/preProcessor.js --cronProcessId 33
source set_env_vars.sh
node executables/webhook/processor.js --cronProcessId 34
- Start balance verifier
source set_env_vars.sh
node executables/balanceVerifier.js --cronProcessId 31
let ConfigGroupModel = require('./app/models/mysql/ConfigGroup');
let auxChainId = 2000;
let auxGroupId = 1;
ConfigGroupModel.markAsAvailableForAllocation(auxChainId, auxGroupId).then(console.log);