@sparkdreamnft/sparkdreamjs 0.0.36 → 0.0.38
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/esm/sparkdream/federation/v1/genesis.js +101 -3
- package/esm/sparkdream/federation/v1/params.js +129 -117
- package/esm/sparkdream/federation/v1/query.js +204 -7
- package/esm/sparkdream/federation/v1/query.lcd.js +11 -2
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +16 -3
- package/esm/sparkdream/federation/v1/types.js +73 -1
- package/esm/sparkdream/federation/v1/verifier_activity.js +143 -45
- package/esm/sparkdream/rep/v1/bonded_role.js +37 -1
- package/esm/sparkdream/rep/v1/initiative.js +11 -14
- package/esm/sparkdream/rep/v1/params.js +362 -2
- package/esm/sparkdream/rep/v1/role_activity.js +13 -1
- package/esm/sparkdream/rep/v1/tx.amino.js +66 -5
- package/esm/sparkdream/rep/v1/tx.js +75 -63
- package/esm/sparkdream/rep/v1/tx.registry.js +18 -18
- package/esm/sparkdream/rep/v1/tx.rpc.msg.js +11 -11
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +150 -55
- package/sparkdream/client.d.ts +48 -3
- package/sparkdream/federation/v1/genesis.d.ts +66 -0
- package/sparkdream/federation/v1/genesis.js +102 -4
- package/sparkdream/federation/v1/params.d.ts +72 -10
- package/sparkdream/federation/v1/params.js +129 -117
- package/sparkdream/federation/v1/query.d.ts +120 -3
- package/sparkdream/federation/v1/query.js +204 -7
- package/sparkdream/federation/v1/query.lcd.d.ts +2 -1
- package/sparkdream/federation/v1/query.lcd.js +11 -2
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +13 -3
- package/sparkdream/federation/v1/query.rpc.Query.js +15 -2
- package/sparkdream/federation/v1/types.d.ts +44 -0
- package/sparkdream/federation/v1/types.js +73 -1
- package/sparkdream/federation/v1/verifier_activity.d.ts +151 -68
- package/sparkdream/federation/v1/verifier_activity.js +144 -46
- package/sparkdream/rep/v1/bonded_role.d.ts +42 -0
- package/sparkdream/rep/v1/bonded_role.js +37 -1
- package/sparkdream/rep/v1/initiative.d.ts +7 -5
- package/sparkdream/rep/v1/initiative.js +11 -14
- package/sparkdream/rep/v1/params.d.ts +242 -2
- package/sparkdream/rep/v1/params.js +362 -2
- package/sparkdream/rep/v1/role_activity.d.ts +26 -0
- package/sparkdream/rep/v1/role_activity.js +13 -1
- package/sparkdream/rep/v1/tx.amino.d.ts +49 -4
- package/sparkdream/rep/v1/tx.amino.js +65 -4
- package/sparkdream/rep/v1/tx.d.ts +145 -109
- package/sparkdream/rep/v1/tx.js +77 -65
- package/sparkdream/rep/v1/tx.registry.d.ts +11 -11
- package/sparkdream/rep/v1/tx.registry.js +17 -17
- package/sparkdream/rep/v1/tx.rpc.msg.d.ts +7 -7
- package/sparkdream/rep/v1/tx.rpc.msg.js +10 -10
- package/sparkdream/rpc.query.d.ts +1 -0
|
@@ -371,7 +371,10 @@ function createBaseBondedRoleConfig() {
|
|
|
371
371
|
minAgeBlocks: BigInt(0),
|
|
372
372
|
demotionCooldown: BigInt(0),
|
|
373
373
|
demotionThreshold: "",
|
|
374
|
-
unbondCooldown: BigInt(0)
|
|
374
|
+
unbondCooldown: BigInt(0),
|
|
375
|
+
upheldToResetOverturns: BigInt(0),
|
|
376
|
+
overturnBaseCooldown: BigInt(0),
|
|
377
|
+
overturnCooldownEscalates: false
|
|
375
378
|
};
|
|
376
379
|
}
|
|
377
380
|
/**
|
|
@@ -414,6 +417,15 @@ exports.BondedRoleConfig = {
|
|
|
414
417
|
if (message.unbondCooldown !== BigInt(0)) {
|
|
415
418
|
writer.uint32(64).int64(message.unbondCooldown);
|
|
416
419
|
}
|
|
420
|
+
if (message.upheldToResetOverturns !== BigInt(0)) {
|
|
421
|
+
writer.uint32(72).uint64(message.upheldToResetOverturns);
|
|
422
|
+
}
|
|
423
|
+
if (message.overturnBaseCooldown !== BigInt(0)) {
|
|
424
|
+
writer.uint32(80).int64(message.overturnBaseCooldown);
|
|
425
|
+
}
|
|
426
|
+
if (message.overturnCooldownEscalates === true) {
|
|
427
|
+
writer.uint32(88).bool(message.overturnCooldownEscalates);
|
|
428
|
+
}
|
|
417
429
|
return writer;
|
|
418
430
|
},
|
|
419
431
|
decode(input, length) {
|
|
@@ -447,6 +459,15 @@ exports.BondedRoleConfig = {
|
|
|
447
459
|
case 8:
|
|
448
460
|
message.unbondCooldown = reader.int64();
|
|
449
461
|
break;
|
|
462
|
+
case 9:
|
|
463
|
+
message.upheldToResetOverturns = reader.uint64();
|
|
464
|
+
break;
|
|
465
|
+
case 10:
|
|
466
|
+
message.overturnBaseCooldown = reader.int64();
|
|
467
|
+
break;
|
|
468
|
+
case 11:
|
|
469
|
+
message.overturnCooldownEscalates = reader.bool();
|
|
470
|
+
break;
|
|
450
471
|
default:
|
|
451
472
|
reader.skipType(tag & 7);
|
|
452
473
|
break;
|
|
@@ -464,6 +485,9 @@ exports.BondedRoleConfig = {
|
|
|
464
485
|
message.demotionCooldown = object.demotionCooldown !== undefined && object.demotionCooldown !== null ? BigInt(object.demotionCooldown.toString()) : BigInt(0);
|
|
465
486
|
message.demotionThreshold = object.demotionThreshold ?? "";
|
|
466
487
|
message.unbondCooldown = object.unbondCooldown !== undefined && object.unbondCooldown !== null ? BigInt(object.unbondCooldown.toString()) : BigInt(0);
|
|
488
|
+
message.upheldToResetOverturns = object.upheldToResetOverturns !== undefined && object.upheldToResetOverturns !== null ? BigInt(object.upheldToResetOverturns.toString()) : BigInt(0);
|
|
489
|
+
message.overturnBaseCooldown = object.overturnBaseCooldown !== undefined && object.overturnBaseCooldown !== null ? BigInt(object.overturnBaseCooldown.toString()) : BigInt(0);
|
|
490
|
+
message.overturnCooldownEscalates = object.overturnCooldownEscalates ?? false;
|
|
467
491
|
return message;
|
|
468
492
|
},
|
|
469
493
|
fromAmino(object) {
|
|
@@ -492,6 +516,15 @@ exports.BondedRoleConfig = {
|
|
|
492
516
|
if (object.unbond_cooldown !== undefined && object.unbond_cooldown !== null) {
|
|
493
517
|
message.unbondCooldown = BigInt(object.unbond_cooldown);
|
|
494
518
|
}
|
|
519
|
+
if (object.upheld_to_reset_overturns !== undefined && object.upheld_to_reset_overturns !== null) {
|
|
520
|
+
message.upheldToResetOverturns = BigInt(object.upheld_to_reset_overturns);
|
|
521
|
+
}
|
|
522
|
+
if (object.overturn_base_cooldown !== undefined && object.overturn_base_cooldown !== null) {
|
|
523
|
+
message.overturnBaseCooldown = BigInt(object.overturn_base_cooldown);
|
|
524
|
+
}
|
|
525
|
+
if (object.overturn_cooldown_escalates !== undefined && object.overturn_cooldown_escalates !== null) {
|
|
526
|
+
message.overturnCooldownEscalates = object.overturn_cooldown_escalates;
|
|
527
|
+
}
|
|
495
528
|
return message;
|
|
496
529
|
},
|
|
497
530
|
toAmino(message) {
|
|
@@ -504,6 +537,9 @@ exports.BondedRoleConfig = {
|
|
|
504
537
|
obj.demotion_cooldown = message.demotionCooldown !== BigInt(0) ? message.demotionCooldown?.toString() : undefined;
|
|
505
538
|
obj.demotion_threshold = message.demotionThreshold === "" ? undefined : message.demotionThreshold;
|
|
506
539
|
obj.unbond_cooldown = message.unbondCooldown !== BigInt(0) ? message.unbondCooldown?.toString() : undefined;
|
|
540
|
+
obj.upheld_to_reset_overturns = message.upheldToResetOverturns !== BigInt(0) ? message.upheldToResetOverturns?.toString() : undefined;
|
|
541
|
+
obj.overturn_base_cooldown = message.overturnBaseCooldown !== BigInt(0) ? message.overturnBaseCooldown?.toString() : undefined;
|
|
542
|
+
obj.overturn_cooldown_escalates = message.overturnCooldownEscalates === false ? undefined : message.overturnCooldownEscalates;
|
|
507
543
|
return obj;
|
|
508
544
|
},
|
|
509
545
|
fromAminoMsg(object) {
|
|
@@ -35,13 +35,15 @@ export declare enum InitiativeStatus {
|
|
|
35
35
|
INITIATIVE_STATUS_CHALLENGED = 4,
|
|
36
36
|
INITIATIVE_STATUS_COMPLETED = 5,
|
|
37
37
|
INITIATIVE_STATUS_REJECTED = 6,
|
|
38
|
-
INITIATIVE_STATUS_ABANDONED = 7,
|
|
39
38
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* INITIATIVE_STATUS_CLOSED - Retired by the project creator or the Operations Committee. The work is
|
|
40
|
+
* not being done and its budget has gone back to the project.
|
|
41
|
+
*
|
|
42
|
+
* Distinct from COMPLETED, which is narrower: COMPLETED means the work was
|
|
43
|
+
* delivered, passed its gates and paid out. CLOSED carries no claim about
|
|
44
|
+
* the work at all, only that the project stopped funding it.
|
|
43
45
|
*/
|
|
44
|
-
|
|
46
|
+
INITIATIVE_STATUS_CLOSED = 7,
|
|
45
47
|
UNRECOGNIZED = -1
|
|
46
48
|
}
|
|
47
49
|
export declare const InitiativeStatusAmino: typeof InitiativeStatus;
|
|
@@ -146,13 +146,15 @@ var InitiativeStatus;
|
|
|
146
146
|
InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_CHALLENGED"] = 4] = "INITIATIVE_STATUS_CHALLENGED";
|
|
147
147
|
InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_COMPLETED"] = 5] = "INITIATIVE_STATUS_COMPLETED";
|
|
148
148
|
InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_REJECTED"] = 6] = "INITIATIVE_STATUS_REJECTED";
|
|
149
|
-
InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_ABANDONED"] = 7] = "INITIATIVE_STATUS_ABANDONED";
|
|
150
149
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
150
|
+
* INITIATIVE_STATUS_CLOSED - Retired by the project creator or the Operations Committee. The work is
|
|
151
|
+
* not being done and its budget has gone back to the project.
|
|
152
|
+
*
|
|
153
|
+
* Distinct from COMPLETED, which is narrower: COMPLETED means the work was
|
|
154
|
+
* delivered, passed its gates and paid out. CLOSED carries no claim about
|
|
155
|
+
* the work at all, only that the project stopped funding it.
|
|
154
156
|
*/
|
|
155
|
-
InitiativeStatus[InitiativeStatus["
|
|
157
|
+
InitiativeStatus[InitiativeStatus["INITIATIVE_STATUS_CLOSED"] = 7] = "INITIATIVE_STATUS_CLOSED";
|
|
156
158
|
InitiativeStatus[InitiativeStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
157
159
|
})(InitiativeStatus || (exports.InitiativeStatus = InitiativeStatus = {}));
|
|
158
160
|
exports.InitiativeStatusAmino = InitiativeStatus;
|
|
@@ -180,11 +182,8 @@ function initiativeStatusFromJSON(object) {
|
|
|
180
182
|
case "INITIATIVE_STATUS_REJECTED":
|
|
181
183
|
return InitiativeStatus.INITIATIVE_STATUS_REJECTED;
|
|
182
184
|
case 7:
|
|
183
|
-
case "
|
|
184
|
-
return InitiativeStatus.
|
|
185
|
-
case 8:
|
|
186
|
-
case "INITIATIVE_STATUS_CANCELLED":
|
|
187
|
-
return InitiativeStatus.INITIATIVE_STATUS_CANCELLED;
|
|
185
|
+
case "INITIATIVE_STATUS_CLOSED":
|
|
186
|
+
return InitiativeStatus.INITIATIVE_STATUS_CLOSED;
|
|
188
187
|
case -1:
|
|
189
188
|
case "UNRECOGNIZED":
|
|
190
189
|
default:
|
|
@@ -207,10 +206,8 @@ function initiativeStatusToJSON(object) {
|
|
|
207
206
|
return "INITIATIVE_STATUS_COMPLETED";
|
|
208
207
|
case InitiativeStatus.INITIATIVE_STATUS_REJECTED:
|
|
209
208
|
return "INITIATIVE_STATUS_REJECTED";
|
|
210
|
-
case InitiativeStatus.
|
|
211
|
-
return "
|
|
212
|
-
case InitiativeStatus.INITIATIVE_STATUS_CANCELLED:
|
|
213
|
-
return "INITIATIVE_STATUS_CANCELLED";
|
|
209
|
+
case InitiativeStatus.INITIATIVE_STATUS_CLOSED:
|
|
210
|
+
return "INITIATIVE_STATUS_CLOSED";
|
|
214
211
|
case InitiativeStatus.UNRECOGNIZED:
|
|
215
212
|
default:
|
|
216
213
|
return "UNRECOGNIZED";
|
|
@@ -385,7 +385,10 @@ export interface Params {
|
|
|
385
385
|
/**
|
|
386
386
|
* External-conviction ratio applied instead of external_conviction_ratio when
|
|
387
387
|
* the initiative is self-assigned. Must be >= external_conviction_ratio and
|
|
388
|
-
* <= 1. Default
|
|
388
|
+
* <= 1. Default 0.75 — a distinct-staker floor as much as a magnitude one,
|
|
389
|
+
* since max_conviction_share_per_member caps any one member's contribution:
|
|
390
|
+
* ceil(0.75 / 0.33) = 3 independent stakers, against 2 for externally
|
|
391
|
+
* assigned work.
|
|
389
392
|
*/
|
|
390
393
|
selfAssignedExternalConvictionRatio: string;
|
|
391
394
|
/**
|
|
@@ -549,6 +552,63 @@ export interface Params {
|
|
|
549
552
|
* Epochs of history the accuracy ring scores. Default 6.
|
|
550
553
|
*/
|
|
551
554
|
reviewerAccuracyWindowEpochs: bigint;
|
|
555
|
+
/**
|
|
556
|
+
* Reviewer bonded-role policy: the eligibility and exit terms for
|
|
557
|
+
* ROLE_TYPE_INITIATIVE_REVIEWER.
|
|
558
|
+
*
|
|
559
|
+
* These live here rather than only in the BondedRoleConfig store so the
|
|
560
|
+
* reviewer role has the same shape as every other bonded role: params are the
|
|
561
|
+
* source of truth and are written through to rep's enforcement state on
|
|
562
|
+
* InitGenesis and on every operational param update (x/forum does this for
|
|
563
|
+
* the sentinel, x/collect for the curator). Before that, the reviewer was the
|
|
564
|
+
* one role no module owned, so its config was reachable only by editing
|
|
565
|
+
* genesis or shipping an upgrade.
|
|
566
|
+
*
|
|
567
|
+
* Field numbers jump past the reviewer pay knobs above because these were
|
|
568
|
+
* added later; they belong to this block by topic, not by number.
|
|
569
|
+
*
|
|
570
|
+
* min_reviewer_bond is deliberately a LOW barrier to entry (500 DREAM), not a
|
|
571
|
+
* measure of what a bad verdict costs. Per-verdict exposure is the reserve --
|
|
572
|
+
* SlashReviewersOnOverturn charges BondReserved, which is
|
|
573
|
+
* reviewer_bond_reserve_rate x the initiative's budget -- so liability already
|
|
574
|
+
* scales with what the review could mint, whatever the floor is.
|
|
575
|
+
*
|
|
576
|
+
* Reviewers scale up by bonding more when they want bigger work. Free bond
|
|
577
|
+
* above a reviewer's open reserves is what decides which initiatives they can
|
|
578
|
+
* pick up and how many at once: at the default 10% rate the floor alone covers
|
|
579
|
+
* work up to ~5,000 DREAM of budget, while an EPIC initiative (10,000 cap)
|
|
580
|
+
* reserves 1,000. Raising the ceiling is just another MsgBondRole against the
|
|
581
|
+
* same record -- it adds to current_bond and is reservable on the next verdict,
|
|
582
|
+
* with no waiting period and no need to unbond first. Keeping the entry price
|
|
583
|
+
* low is the point: reviewing should be something an ordinary member can start
|
|
584
|
+
* doing and then grow into, rather than something gated on holding a large
|
|
585
|
+
* balance up front.
|
|
586
|
+
*/
|
|
587
|
+
minReviewerBond: string;
|
|
588
|
+
/**
|
|
589
|
+
* Free bond below which a reviewer is demoted out of the role. Conventionally
|
|
590
|
+
* half of min_reviewer_bond.
|
|
591
|
+
*/
|
|
592
|
+
reviewerDemotionThreshold: string;
|
|
593
|
+
/**
|
|
594
|
+
* Trust level a member must hold to bond as a reviewer. The trust ladder
|
|
595
|
+
* already encodes reputation, so this is the whole eligibility gate and
|
|
596
|
+
* min_reviewer_rep_tier stays 0 (see BondedRoleConfig seeding notes).
|
|
597
|
+
*
|
|
598
|
+
* Required, unlike the sentinel's and curator's: BondRole skips the trust
|
|
599
|
+
* check entirely on an empty string, so an omitted level would silently open
|
|
600
|
+
* the one role whose approvals mint DREAM. An ungated roster is still
|
|
601
|
+
* expressible as TRUST_LEVEL_NEW.
|
|
602
|
+
*/
|
|
603
|
+
minReviewerTrustLevel: string;
|
|
604
|
+
minReviewerRepTier: bigint;
|
|
605
|
+
minReviewerAgeBlocks: bigint;
|
|
606
|
+
reviewerDemotionCooldown: bigint;
|
|
607
|
+
/**
|
|
608
|
+
* Bond stays slashable through this window after an unbond request, so open
|
|
609
|
+
* verdicts can age out and still be charged if a jury overturns them.
|
|
610
|
+
*/
|
|
611
|
+
reviewerUnbondCooldown: bigint;
|
|
552
612
|
/**
|
|
553
613
|
* Ceiling on the uspark x/rep may draw from the community pool per UTC day to
|
|
554
614
|
* fund its bonded-role reward pools.
|
|
@@ -643,6 +703,43 @@ export interface Params {
|
|
|
643
703
|
* requirement entirely.
|
|
644
704
|
*/
|
|
645
705
|
permissionlessMinReviewBountyRate: string;
|
|
706
|
+
/**
|
|
707
|
+
* --- Federation verifier pay (SPARK pool + DREAM stipend) ---
|
|
708
|
+
*
|
|
709
|
+
* The verifier's whole reward distribution lives here rather than in
|
|
710
|
+
* x/federation, for the same reason the curator's lives here rather than in
|
|
711
|
+
* x/collect: the accuracy it scores comes from the shared RoleActivity
|
|
712
|
+
* record x/rep owns, and the epoch it resets is the epoch the accuracy ring
|
|
713
|
+
* is stamped in. Two modules distributing on two independently-editable
|
|
714
|
+
* cadences would both reset those per-epoch counters and neither would read
|
|
715
|
+
* a coherent window. x/federation keeps the verification mechanics -- bond,
|
|
716
|
+
* slash, challenge windows, cooldown base -- and reports actions here.
|
|
717
|
+
*
|
|
718
|
+
* The verifier is the one bonded role whose work has an OFF-chain cost:
|
|
719
|
+
* fetching the peer's content and hashing it, then paying SPARK gas to
|
|
720
|
+
* submit. Paying only in DREAM made it the single role where doing the job
|
|
721
|
+
* drains the holder's SPARK and returns a token they cannot spend on gas.
|
|
722
|
+
*/
|
|
723
|
+
maxVerifierRewardPool: string;
|
|
724
|
+
verifierRewardPoolOverflowBurnRatio: string;
|
|
725
|
+
verifierRewardEpochBlocks: bigint;
|
|
726
|
+
minVerifierAccuracy: string;
|
|
727
|
+
verifierAccuracyWindowEpochs: bigint;
|
|
728
|
+
/**
|
|
729
|
+
* Verified items required in an epoch to earn anything that epoch. This is
|
|
730
|
+
* the ONLY place volume enters verifier pay -- as a floor, never as a
|
|
731
|
+
* weight. See the score formula in x/rep/keeper/verifier_reward_distribution.go
|
|
732
|
+
* for why weighting by verified_count is the wrong curve for this role.
|
|
733
|
+
*/
|
|
734
|
+
minEpochVerifications: number;
|
|
735
|
+
/**
|
|
736
|
+
* Flat DREAM minted per eligible verifier per epoch, scaled down pro-rata
|
|
737
|
+
* when the roster would push the epoch's total past the mint cap. Auto-bonds
|
|
738
|
+
* while the verifier is in RECOVERY so a slashed verifier can rebuild their
|
|
739
|
+
* bond by working rather than by fronting DREAM.
|
|
740
|
+
*/
|
|
741
|
+
verifierDreamReward: string;
|
|
742
|
+
maxVerifierDreamMintPerEpoch: string;
|
|
646
743
|
}
|
|
647
744
|
export interface ParamsProtoMsg {
|
|
648
745
|
typeUrl: "/sparkdream.rep.v1.Params";
|
|
@@ -943,7 +1040,10 @@ export interface ParamsAmino {
|
|
|
943
1040
|
/**
|
|
944
1041
|
* External-conviction ratio applied instead of external_conviction_ratio when
|
|
945
1042
|
* the initiative is self-assigned. Must be >= external_conviction_ratio and
|
|
946
|
-
* <= 1. Default
|
|
1043
|
+
* <= 1. Default 0.75 — a distinct-staker floor as much as a magnitude one,
|
|
1044
|
+
* since max_conviction_share_per_member caps any one member's contribution:
|
|
1045
|
+
* ceil(0.75 / 0.33) = 3 independent stakers, against 2 for externally
|
|
1046
|
+
* assigned work.
|
|
947
1047
|
*/
|
|
948
1048
|
self_assigned_external_conviction_ratio?: string;
|
|
949
1049
|
/**
|
|
@@ -1107,6 +1207,63 @@ export interface ParamsAmino {
|
|
|
1107
1207
|
* Epochs of history the accuracy ring scores. Default 6.
|
|
1108
1208
|
*/
|
|
1109
1209
|
reviewer_accuracy_window_epochs?: string;
|
|
1210
|
+
/**
|
|
1211
|
+
* Reviewer bonded-role policy: the eligibility and exit terms for
|
|
1212
|
+
* ROLE_TYPE_INITIATIVE_REVIEWER.
|
|
1213
|
+
*
|
|
1214
|
+
* These live here rather than only in the BondedRoleConfig store so the
|
|
1215
|
+
* reviewer role has the same shape as every other bonded role: params are the
|
|
1216
|
+
* source of truth and are written through to rep's enforcement state on
|
|
1217
|
+
* InitGenesis and on every operational param update (x/forum does this for
|
|
1218
|
+
* the sentinel, x/collect for the curator). Before that, the reviewer was the
|
|
1219
|
+
* one role no module owned, so its config was reachable only by editing
|
|
1220
|
+
* genesis or shipping an upgrade.
|
|
1221
|
+
*
|
|
1222
|
+
* Field numbers jump past the reviewer pay knobs above because these were
|
|
1223
|
+
* added later; they belong to this block by topic, not by number.
|
|
1224
|
+
*
|
|
1225
|
+
* min_reviewer_bond is deliberately a LOW barrier to entry (500 DREAM), not a
|
|
1226
|
+
* measure of what a bad verdict costs. Per-verdict exposure is the reserve --
|
|
1227
|
+
* SlashReviewersOnOverturn charges BondReserved, which is
|
|
1228
|
+
* reviewer_bond_reserve_rate x the initiative's budget -- so liability already
|
|
1229
|
+
* scales with what the review could mint, whatever the floor is.
|
|
1230
|
+
*
|
|
1231
|
+
* Reviewers scale up by bonding more when they want bigger work. Free bond
|
|
1232
|
+
* above a reviewer's open reserves is what decides which initiatives they can
|
|
1233
|
+
* pick up and how many at once: at the default 10% rate the floor alone covers
|
|
1234
|
+
* work up to ~5,000 DREAM of budget, while an EPIC initiative (10,000 cap)
|
|
1235
|
+
* reserves 1,000. Raising the ceiling is just another MsgBondRole against the
|
|
1236
|
+
* same record -- it adds to current_bond and is reservable on the next verdict,
|
|
1237
|
+
* with no waiting period and no need to unbond first. Keeping the entry price
|
|
1238
|
+
* low is the point: reviewing should be something an ordinary member can start
|
|
1239
|
+
* doing and then grow into, rather than something gated on holding a large
|
|
1240
|
+
* balance up front.
|
|
1241
|
+
*/
|
|
1242
|
+
min_reviewer_bond?: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* Free bond below which a reviewer is demoted out of the role. Conventionally
|
|
1245
|
+
* half of min_reviewer_bond.
|
|
1246
|
+
*/
|
|
1247
|
+
reviewer_demotion_threshold?: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* Trust level a member must hold to bond as a reviewer. The trust ladder
|
|
1250
|
+
* already encodes reputation, so this is the whole eligibility gate and
|
|
1251
|
+
* min_reviewer_rep_tier stays 0 (see BondedRoleConfig seeding notes).
|
|
1252
|
+
*
|
|
1253
|
+
* Required, unlike the sentinel's and curator's: BondRole skips the trust
|
|
1254
|
+
* check entirely on an empty string, so an omitted level would silently open
|
|
1255
|
+
* the one role whose approvals mint DREAM. An ungated roster is still
|
|
1256
|
+
* expressible as TRUST_LEVEL_NEW.
|
|
1257
|
+
*/
|
|
1258
|
+
min_reviewer_trust_level?: string;
|
|
1259
|
+
min_reviewer_rep_tier?: string;
|
|
1260
|
+
min_reviewer_age_blocks?: string;
|
|
1261
|
+
reviewer_demotion_cooldown?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* Bond stays slashable through this window after an unbond request, so open
|
|
1264
|
+
* verdicts can age out and still be charged if a jury overturns them.
|
|
1265
|
+
*/
|
|
1266
|
+
reviewer_unbond_cooldown?: string;
|
|
1110
1267
|
/**
|
|
1111
1268
|
* Ceiling on the uspark x/rep may draw from the community pool per UTC day to
|
|
1112
1269
|
* fund its bonded-role reward pools.
|
|
@@ -1201,6 +1358,43 @@ export interface ParamsAmino {
|
|
|
1201
1358
|
* requirement entirely.
|
|
1202
1359
|
*/
|
|
1203
1360
|
permissionless_min_review_bounty_rate?: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* --- Federation verifier pay (SPARK pool + DREAM stipend) ---
|
|
1363
|
+
*
|
|
1364
|
+
* The verifier's whole reward distribution lives here rather than in
|
|
1365
|
+
* x/federation, for the same reason the curator's lives here rather than in
|
|
1366
|
+
* x/collect: the accuracy it scores comes from the shared RoleActivity
|
|
1367
|
+
* record x/rep owns, and the epoch it resets is the epoch the accuracy ring
|
|
1368
|
+
* is stamped in. Two modules distributing on two independently-editable
|
|
1369
|
+
* cadences would both reset those per-epoch counters and neither would read
|
|
1370
|
+
* a coherent window. x/federation keeps the verification mechanics -- bond,
|
|
1371
|
+
* slash, challenge windows, cooldown base -- and reports actions here.
|
|
1372
|
+
*
|
|
1373
|
+
* The verifier is the one bonded role whose work has an OFF-chain cost:
|
|
1374
|
+
* fetching the peer's content and hashing it, then paying SPARK gas to
|
|
1375
|
+
* submit. Paying only in DREAM made it the single role where doing the job
|
|
1376
|
+
* drains the holder's SPARK and returns a token they cannot spend on gas.
|
|
1377
|
+
*/
|
|
1378
|
+
max_verifier_reward_pool?: string;
|
|
1379
|
+
verifier_reward_pool_overflow_burn_ratio?: string;
|
|
1380
|
+
verifier_reward_epoch_blocks?: string;
|
|
1381
|
+
min_verifier_accuracy?: string;
|
|
1382
|
+
verifier_accuracy_window_epochs?: string;
|
|
1383
|
+
/**
|
|
1384
|
+
* Verified items required in an epoch to earn anything that epoch. This is
|
|
1385
|
+
* the ONLY place volume enters verifier pay -- as a floor, never as a
|
|
1386
|
+
* weight. See the score formula in x/rep/keeper/verifier_reward_distribution.go
|
|
1387
|
+
* for why weighting by verified_count is the wrong curve for this role.
|
|
1388
|
+
*/
|
|
1389
|
+
min_epoch_verifications?: number;
|
|
1390
|
+
/**
|
|
1391
|
+
* Flat DREAM minted per eligible verifier per epoch, scaled down pro-rata
|
|
1392
|
+
* when the roster would push the epoch's total past the mint cap. Auto-bonds
|
|
1393
|
+
* while the verifier is in RECOVERY so a slashed verifier can rebuild their
|
|
1394
|
+
* bond by working rather than by fronting DREAM.
|
|
1395
|
+
*/
|
|
1396
|
+
verifier_dream_reward?: string;
|
|
1397
|
+
max_verifier_dream_mint_per_epoch?: string;
|
|
1204
1398
|
}
|
|
1205
1399
|
export interface ParamsAminoMsg {
|
|
1206
1400
|
type: "sparkdream/x/rep/Params";
|
|
@@ -1477,6 +1671,29 @@ export interface RepOperationalParams {
|
|
|
1477
1671
|
reviewRequiredAboveBudget: string;
|
|
1478
1672
|
reviewBountyReclaimDelay: bigint;
|
|
1479
1673
|
permissionlessMinReviewBountyRate: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* Mirrors the federation-verifier pay params in Params.
|
|
1676
|
+
*/
|
|
1677
|
+
maxVerifierRewardPool: string;
|
|
1678
|
+
verifierRewardPoolOverflowBurnRatio: string;
|
|
1679
|
+
verifierRewardEpochBlocks: bigint;
|
|
1680
|
+
minVerifierAccuracy: string;
|
|
1681
|
+
verifierAccuracyWindowEpochs: bigint;
|
|
1682
|
+
minEpochVerifications: number;
|
|
1683
|
+
verifierDreamReward: string;
|
|
1684
|
+
maxVerifierDreamMintPerEpoch: string;
|
|
1685
|
+
/**
|
|
1686
|
+
* Mirrors the reviewer bonded-role policy in Params. Updating these writes
|
|
1687
|
+
* through to the BondedRoleConfig for ROLE_TYPE_INITIATIVE_REVIEWER, so the
|
|
1688
|
+
* reviewer bond floor is tunable by council vote like every other role's.
|
|
1689
|
+
*/
|
|
1690
|
+
minReviewerBond: string;
|
|
1691
|
+
reviewerDemotionThreshold: string;
|
|
1692
|
+
minReviewerTrustLevel: string;
|
|
1693
|
+
minReviewerRepTier: bigint;
|
|
1694
|
+
minReviewerAgeBlocks: bigint;
|
|
1695
|
+
reviewerDemotionCooldown: bigint;
|
|
1696
|
+
reviewerUnbondCooldown: bigint;
|
|
1480
1697
|
}
|
|
1481
1698
|
export interface RepOperationalParamsProtoMsg {
|
|
1482
1699
|
typeUrl: "/sparkdream.rep.v1.RepOperationalParams";
|
|
@@ -1753,6 +1970,29 @@ export interface RepOperationalParamsAmino {
|
|
|
1753
1970
|
review_required_above_budget?: string;
|
|
1754
1971
|
review_bounty_reclaim_delay?: string;
|
|
1755
1972
|
permissionless_min_review_bounty_rate?: string;
|
|
1973
|
+
/**
|
|
1974
|
+
* Mirrors the federation-verifier pay params in Params.
|
|
1975
|
+
*/
|
|
1976
|
+
max_verifier_reward_pool?: string;
|
|
1977
|
+
verifier_reward_pool_overflow_burn_ratio?: string;
|
|
1978
|
+
verifier_reward_epoch_blocks?: string;
|
|
1979
|
+
min_verifier_accuracy?: string;
|
|
1980
|
+
verifier_accuracy_window_epochs?: string;
|
|
1981
|
+
min_epoch_verifications?: number;
|
|
1982
|
+
verifier_dream_reward?: string;
|
|
1983
|
+
max_verifier_dream_mint_per_epoch?: string;
|
|
1984
|
+
/**
|
|
1985
|
+
* Mirrors the reviewer bonded-role policy in Params. Updating these writes
|
|
1986
|
+
* through to the BondedRoleConfig for ROLE_TYPE_INITIATIVE_REVIEWER, so the
|
|
1987
|
+
* reviewer bond floor is tunable by council vote like every other role's.
|
|
1988
|
+
*/
|
|
1989
|
+
min_reviewer_bond?: string;
|
|
1990
|
+
reviewer_demotion_threshold?: string;
|
|
1991
|
+
min_reviewer_trust_level?: string;
|
|
1992
|
+
min_reviewer_rep_tier?: string;
|
|
1993
|
+
min_reviewer_age_blocks?: string;
|
|
1994
|
+
reviewer_demotion_cooldown?: string;
|
|
1995
|
+
reviewer_unbond_cooldown?: string;
|
|
1756
1996
|
}
|
|
1757
1997
|
export interface RepOperationalParamsAminoMsg {
|
|
1758
1998
|
type: "sparkdream/x/rep/RepOperationalParams";
|