@xyo-network/xl1-cli-lib 1.15.3 → 1.15.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/index.mjs +6 -3
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/orchestration/initServices.d.ts.map +1 -1
- package/dist/node/xl1.mjs +6 -3
- package/dist/node/xl1.mjs.map +1 -1
- package/package.json +6 -6
- package/src/orchestration/actor/implementation/ProducerActor.ts +1 -1
- package/src/orchestration/initServices.ts +12 -3
- package/src/spec/BootstrapChain.spec.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/xl1-cli-lib",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.4",
|
|
4
4
|
"description": "XYO Layer One CLI Library",
|
|
5
5
|
"homepage": "https://xylabs.com",
|
|
6
6
|
"bugs": {
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"@xyo-network/archivist-lmdb": "~5.1.6",
|
|
56
56
|
"@xyo-network/archivist-memory": "~5.1.6",
|
|
57
57
|
"@xyo-network/archivist-model": "~5.1.6",
|
|
58
|
-
"@xyo-network/chain-api": "~1.15.
|
|
59
|
-
"@xyo-network/chain-bridge": "~1.15.
|
|
60
|
-
"@xyo-network/chain-sdk": "~1.15.
|
|
58
|
+
"@xyo-network/chain-api": "~1.15.4",
|
|
59
|
+
"@xyo-network/chain-bridge": "~1.15.4",
|
|
60
|
+
"@xyo-network/chain-sdk": "~1.15.4",
|
|
61
61
|
"@xyo-network/payload-builder": "~5.1.6",
|
|
62
62
|
"@xyo-network/payload-model": "~5.1.6",
|
|
63
63
|
"@xyo-network/wallet": "~5.1.6",
|
|
64
64
|
"@xyo-network/wallet-model": "~5.1.6",
|
|
65
|
-
"@xyo-network/xl1-protocol": "~1.12.
|
|
66
|
-
"@xyo-network/xl1-protocol-sdk": "~1.15.
|
|
65
|
+
"@xyo-network/xl1-protocol": "~1.12.69",
|
|
66
|
+
"@xyo-network/xl1-protocol-sdk": "~1.15.4",
|
|
67
67
|
"async-mutex": "~0.5.0",
|
|
68
68
|
"cosmiconfig": "~9.0.0",
|
|
69
69
|
"dotenv": "~17.2.3",
|
|
@@ -233,7 +233,7 @@ export class ProducerActor extends Actor<ProducerActorParams> {
|
|
|
233
233
|
// Use StakeIntentService to get the required minimum stake
|
|
234
234
|
const requiredMinimumStake = this.stakeIntentService.getRequiredMinimumStakeForIntent('producer')
|
|
235
235
|
// Check if we have a valid stake before declaring intent
|
|
236
|
-
const currentStake = await this.chainStakeViewer.
|
|
236
|
+
const currentStake = await this.chainStakeViewer.activeByStaked(this.account.address)
|
|
237
237
|
if (currentStake < requiredMinimumStake) {
|
|
238
238
|
this.logger?.error(`Producer ${this.account.address} has insufficient stake.`)
|
|
239
239
|
return false
|
|
@@ -5,12 +5,13 @@ import type { Logger } from '@xylabs/logger'
|
|
|
5
5
|
import { isDefined } from '@xylabs/typeof'
|
|
6
6
|
import type { BaseBlockProducerServiceParams, XyoValidatorParams } from '@xyo-network/chain-sdk'
|
|
7
7
|
import {
|
|
8
|
-
initTelemetry, startupSpanAsync, validateHydratedBlockState,
|
|
8
|
+
initTelemetry, startupSpanAsync, StepSizes, validateHydratedBlockState,
|
|
9
9
|
} from '@xyo-network/chain-sdk'
|
|
10
10
|
import type { Payload, WithStorageMeta } from '@xyo-network/payload-model'
|
|
11
11
|
import {
|
|
12
12
|
type ChainServiceCollectionV2, type Config, readPayloadMapFromStore,
|
|
13
13
|
} from '@xyo-network/xl1-protocol-sdk'
|
|
14
|
+
import { Semaphore } from 'async-mutex'
|
|
14
15
|
|
|
15
16
|
import {
|
|
16
17
|
initChainFinalizedArchivist, initChainSubmissionsArchivist, initPendingBundledTransactionsArchivist, initRejectedTransactionsArchivist,
|
|
@@ -169,7 +170,11 @@ export const initServices = async (context: InitServicesContext): Promise<ChainS
|
|
|
169
170
|
() => initBalanceService({
|
|
170
171
|
name: 'BalanceService' as CreatableName,
|
|
171
172
|
context: {
|
|
172
|
-
|
|
173
|
+
stepSemaphores: StepSizes.map(() => new Semaphore(20)),
|
|
174
|
+
store: { chainMap },
|
|
175
|
+
head: () => ZERO_HASH,
|
|
176
|
+
chainId,
|
|
177
|
+
summaryMap: balanceSummaryMap,
|
|
173
178
|
},
|
|
174
179
|
...initParams,
|
|
175
180
|
}),
|
|
@@ -179,7 +184,11 @@ export const initServices = async (context: InitServicesContext): Promise<ChainS
|
|
|
179
184
|
() => initTransferService({
|
|
180
185
|
name: 'TransferService' as CreatableName,
|
|
181
186
|
context: {
|
|
182
|
-
|
|
187
|
+
stepSemaphores: StepSizes.map(() => new Semaphore(20)),
|
|
188
|
+
store: { chainMap },
|
|
189
|
+
head: () => ZERO_HASH,
|
|
190
|
+
chainId,
|
|
191
|
+
summaryMap: transferSummaryMap,
|
|
183
192
|
},
|
|
184
193
|
...initParams,
|
|
185
194
|
}),
|
|
@@ -70,7 +70,7 @@ describe.sequential.skip('MultiProducer Network', () => {
|
|
|
70
70
|
const provider1 = new JsonRpcProvider(`http://127.0.0.1:${ganachePort}`, 1337)
|
|
71
71
|
const ethWalletPerson1 = new Wallet(blockProducerAccount.privateKey, provider1)
|
|
72
72
|
const xyoChainPerson1 = await EvmChainService.create({ id: xyoChainContractAddress, runner: ethWalletPerson1 as ContractRunner })
|
|
73
|
-
expect(await xyoChainPerson1.addStake(await ethWalletPerson1.getAddress(), parseUnits('50', 18))).toBeTrue()
|
|
73
|
+
expect(await xyoChainPerson1.addStake(asAddress(await ethWalletPerson1.getAddress(), true), parseUnits('50', 18))).toBeTrue()
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
beforeAll(async () => {
|