@agoric/cosmos 0.35.0-u18.3 → 0.35.0-u18.5

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.
@@ -161,6 +161,15 @@ type Params struct {
161
161
  // nodes must all serialize and deserialize the existing order without
162
162
  // permuting it.
163
163
  QueueMax []QueueSize `protobuf:"bytes,5,rep,name=queue_max,json=queueMax,proto3" json:"queue_max"`
164
+ // Vat cleanup budget values.
165
+ // These values are used by SwingSet to control the pace of removing data
166
+ // associated with a terminated vat as described at
167
+ // https://github.com/Agoric/agoric-sdk/blob/master/packages/SwingSet/docs/run-policy.md#terminated-vat-cleanup
168
+ //
169
+ // There is no required order to this list of entries, but all the chain
170
+ // nodes must all serialize and deserialize the existing order without
171
+ // permuting it.
172
+ VatCleanupBudget []UintMapEntry `protobuf:"bytes,6,rep,name=vat_cleanup_budget,json=vatCleanupBudget,proto3" json:"vat_cleanup_budget"`
164
173
  }
165
174
 
166
175
  func (m *Params) Reset() { *m = Params{} }
@@ -230,6 +239,13 @@ func (m *Params) GetQueueMax() []QueueSize {
230
239
  return nil
231
240
  }
232
241
 
242
+ func (m *Params) GetVatCleanupBudget() []UintMapEntry {
243
+ if m != nil {
244
+ return m.VatCleanupBudget
245
+ }
246
+ return nil
247
+ }
248
+
233
249
  // The current state of the module.
234
250
  type State struct {
235
251
  // The allowed number of items to add to queues, as determined by SwingSet.
@@ -379,6 +395,7 @@ func (m *PowerFlagFee) GetFee() github_com_cosmos_cosmos_sdk_types.Coins {
379
395
  }
380
396
 
381
397
  // Map element of a string key to a size.
398
+ // TODO: Replace with UintMapEntry?
382
399
  type QueueSize struct {
383
400
  // What the size is for.
384
401
  Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
@@ -433,6 +450,54 @@ func (m *QueueSize) GetSize_() int32 {
433
450
  return 0
434
451
  }
435
452
 
453
+ // Map element of a string key to an unsigned integer.
454
+ // The value uses cosmos-sdk Uint rather than a native Go type to ensure that
455
+ // zeroes survive "omitempty" JSON serialization.
456
+ type UintMapEntry struct {
457
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
458
+ Value github_com_cosmos_cosmos_sdk_types.Uint `protobuf:"bytes,2,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"value"`
459
+ }
460
+
461
+ func (m *UintMapEntry) Reset() { *m = UintMapEntry{} }
462
+ func (m *UintMapEntry) String() string { return proto.CompactTextString(m) }
463
+ func (*UintMapEntry) ProtoMessage() {}
464
+ func (*UintMapEntry) Descriptor() ([]byte, []int) {
465
+ return fileDescriptor_ff9c341e0de15f8b, []int{7}
466
+ }
467
+ func (m *UintMapEntry) XXX_Unmarshal(b []byte) error {
468
+ return m.Unmarshal(b)
469
+ }
470
+ func (m *UintMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
471
+ if deterministic {
472
+ return xxx_messageInfo_UintMapEntry.Marshal(b, m, deterministic)
473
+ } else {
474
+ b = b[:cap(b)]
475
+ n, err := m.MarshalToSizedBuffer(b)
476
+ if err != nil {
477
+ return nil, err
478
+ }
479
+ return b[:n], nil
480
+ }
481
+ }
482
+ func (m *UintMapEntry) XXX_Merge(src proto.Message) {
483
+ xxx_messageInfo_UintMapEntry.Merge(m, src)
484
+ }
485
+ func (m *UintMapEntry) XXX_Size() int {
486
+ return m.Size()
487
+ }
488
+ func (m *UintMapEntry) XXX_DiscardUnknown() {
489
+ xxx_messageInfo_UintMapEntry.DiscardUnknown(m)
490
+ }
491
+
492
+ var xxx_messageInfo_UintMapEntry proto.InternalMessageInfo
493
+
494
+ func (m *UintMapEntry) GetKey() string {
495
+ if m != nil {
496
+ return m.Key
497
+ }
498
+ return ""
499
+ }
500
+
436
501
  // Egress is the format for a swingset egress.
437
502
  type Egress struct {
438
503
  Nickname string `protobuf:"bytes,1,opt,name=nickname,proto3" json:"nickname" yaml:"nickname"`
@@ -445,7 +510,7 @@ func (m *Egress) Reset() { *m = Egress{} }
445
510
  func (m *Egress) String() string { return proto.CompactTextString(m) }
446
511
  func (*Egress) ProtoMessage() {}
447
512
  func (*Egress) Descriptor() ([]byte, []int) {
448
- return fileDescriptor_ff9c341e0de15f8b, []int{7}
513
+ return fileDescriptor_ff9c341e0de15f8b, []int{8}
449
514
  }
450
515
  func (m *Egress) XXX_Unmarshal(b []byte) error {
451
516
  return m.Unmarshal(b)
@@ -508,7 +573,7 @@ func (m *SwingStoreArtifact) Reset() { *m = SwingStoreArtifact{} }
508
573
  func (m *SwingStoreArtifact) String() string { return proto.CompactTextString(m) }
509
574
  func (*SwingStoreArtifact) ProtoMessage() {}
510
575
  func (*SwingStoreArtifact) Descriptor() ([]byte, []int) {
511
- return fileDescriptor_ff9c341e0de15f8b, []int{8}
576
+ return fileDescriptor_ff9c341e0de15f8b, []int{9}
512
577
  }
513
578
  func (m *SwingStoreArtifact) XXX_Unmarshal(b []byte) error {
514
579
  return m.Unmarshal(b)
@@ -559,6 +624,7 @@ func init() {
559
624
  proto.RegisterType((*StringBeans)(nil), "agoric.swingset.StringBeans")
560
625
  proto.RegisterType((*PowerFlagFee)(nil), "agoric.swingset.PowerFlagFee")
561
626
  proto.RegisterType((*QueueSize)(nil), "agoric.swingset.QueueSize")
627
+ proto.RegisterType((*UintMapEntry)(nil), "agoric.swingset.UintMapEntry")
562
628
  proto.RegisterType((*Egress)(nil), "agoric.swingset.Egress")
563
629
  proto.RegisterType((*SwingStoreArtifact)(nil), "agoric.swingset.SwingStoreArtifact")
564
630
  }
@@ -566,60 +632,64 @@ func init() {
566
632
  func init() { proto.RegisterFile("agoric/swingset/swingset.proto", fileDescriptor_ff9c341e0de15f8b) }
567
633
 
568
634
  var fileDescriptor_ff9c341e0de15f8b = []byte{
569
- // 842 bytes of a gzipped FileDescriptorProto
570
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x6f, 0xe3, 0x44,
571
- 0x14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,
615
- 0xb9, 0x41, 0x25, 0xc1, 0xf0, 0xaf, 0xb9, 0x0a, 0xd0, 0x58, 0xdf, 0xb2, 0xb1, 0xe2, 0x82, 0x0e,
616
- 0x85, 0x62, 0x33, 0x12, 0x29, 0xf4, 0x08, 0x1a, 0x15, 0x19, 0x1e, 0x68, 0x36, 0x85, 0x04, 0x05,
617
- 0x1b, 0x4b, 0xdf, 0x38, 0x75, 0xf2, 0x94, 0x28, 0x52, 0x50, 0x37, 0xc9, 0xda, 0x5e, 0x25, 0x6b,
618
- 0xcb, 0x0d, 0x8c, 0xd3, 0x76, 0xf5, 0x0f, 0x5f, 0x5d, 0xf5, 0x9c, 0xd7, 0x57, 0x3d, 0xe7, 0xf7,
619
- 0xab, 0x9e, 0xf3, 0xc3, 0x75, 0xaf, 0xf6, 0xfa, 0xba, 0x57, 0xfb, 0xe5, 0xba, 0x57, 0xfb, 0xf2,
620
- 0x69, 0x45, 0x9e, 0xa1, 0xfd, 0x73, 0xb0, 0x1f, 0x83, 0x91, 0x27, 0xe6, 0x09, 0x49, 0xe3, 0xa5,
621
- 0x6e, 0xe7, 0xab, 0xff, 0x0d, 0xa3, 0xdb, 0x64, 0xcd, 0x3c, 0xf7, 0x1f, 0xfc, 0x1d, 0x00, 0x00,
622
- 0xff, 0xff, 0xee, 0x34, 0x5f, 0xf6, 0x57, 0x06, 0x00, 0x00,
635
+ // 897 bytes of a gzipped FileDescriptorProto
636
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0xe3, 0x44,
637
+ 0x18, 0x8e, 0xc9, 0x07, 0xcd, 0x9b, 0x6c, 0x5b, 0x86, 0x4a, 0x1b, 0x2a, 0x36, 0xae, 0x7c, 0xa1,
638
+ 0xd2, 0x6a, 0x93, 0x2d, 0x08, 0x21, 0x65, 0xc5, 0x21, 0x8e, 0xb2, 0x5a, 0x09, 0x2d, 0xca, 0x3a,
639
+ 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x71, 0xad, 0xa8, 0xfe,
683
+ 0x76, 0xd6, 0xdd, 0x83, 0x8b, 0xcc, 0x86, 0x5c, 0x78, 0x7e, 0x95, 0xd9, 0x90, 0x8b, 0xcc, 0x57,
684
+ 0x99, 0xfd, 0x9e, 0x19, 0x9c, 0xfb, 0x1c, 0xaf, 0x90, 0xa0, 0xf6, 0x2f, 0x39, 0x02, 0xd0, 0x58,
685
+ 0x5e, 0xea, 0xb1, 0x60, 0x29, 0xe9, 0xa7, 0x82, 0xce, 0x70, 0x20, 0xd0, 0x7d, 0xa8, 0x14, 0x68,
686
+ 0xb8, 0x2b, 0xb7, 0x31, 0x14, 0x98, 0x6d, 0xf4, 0xfa, 0xca, 0x29, 0x93, 0xa7, 0x58, 0x60, 0xb3,
687
+ 0xba, 0x4a, 0x96, 0xf6, 0x75, 0xb2, 0xb4, 0x1c, 0x4f, 0x39, 0xf5, 0x54, 0xf7, 0xf0, 0xe5, 0x45,
688
+ 0xdb, 0x7a, 0x75, 0xd1, 0xb6, 0x5e, 0x5f, 0xb4, 0xad, 0x1f, 0x2f, 0xdb, 0xa5, 0x57, 0x97, 0xed,
689
+ 0xd2, 0xaf, 0x97, 0xed, 0xd2, 0xd7, 0x8f, 0x0a, 0xf4, 0xf4, 0xf5, 0xef, 0x4d, 0xbf, 0x7b, 0x8a,
690
+ 0x9e, 0x90, 0x45, 0x38, 0x0e, 0xd7, 0xbc, 0x9d, 0x5e, 0xff, 0xf9, 0x14, 0x6f, 0x93, 0x9a, 0xfa,
691
+ 0x61, 0x7d, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0x66, 0x1a, 0x0f, 0x19, 0x07, 0x00,
692
+ 0x00,
623
693
  }
624
694
 
625
695
  func (this *Params) Equal(that interface{}) bool {
@@ -676,6 +746,14 @@ func (this *Params) Equal(that interface{}) bool {
676
746
  return false
677
747
  }
678
748
  }
749
+ if len(this.VatCleanupBudget) != len(that1.VatCleanupBudget) {
750
+ return false
751
+ }
752
+ for i := range this.VatCleanupBudget {
753
+ if !this.VatCleanupBudget[i].Equal(&that1.VatCleanupBudget[i]) {
754
+ return false
755
+ }
756
+ }
679
757
  return true
680
758
  }
681
759
  func (this *StringBeans) Equal(that interface{}) bool {
@@ -764,6 +842,33 @@ func (this *QueueSize) Equal(that interface{}) bool {
764
842
  }
765
843
  return true
766
844
  }
845
+ func (this *UintMapEntry) Equal(that interface{}) bool {
846
+ if that == nil {
847
+ return this == nil
848
+ }
849
+
850
+ that1, ok := that.(*UintMapEntry)
851
+ if !ok {
852
+ that2, ok := that.(UintMapEntry)
853
+ if ok {
854
+ that1 = &that2
855
+ } else {
856
+ return false
857
+ }
858
+ }
859
+ if that1 == nil {
860
+ return this == nil
861
+ } else if this == nil {
862
+ return false
863
+ }
864
+ if this.Key != that1.Key {
865
+ return false
866
+ }
867
+ if !this.Value.Equal(that1.Value) {
868
+ return false
869
+ }
870
+ return true
871
+ }
767
872
  func (m *CoreEvalProposal) Marshal() (dAtA []byte, err error) {
768
873
  size := m.Size()
769
874
  dAtA = make([]byte, size)
@@ -872,6 +977,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
872
977
  _ = i
873
978
  var l int
874
979
  _ = l
980
+ if len(m.VatCleanupBudget) > 0 {
981
+ for iNdEx := len(m.VatCleanupBudget) - 1; iNdEx >= 0; iNdEx-- {
982
+ {
983
+ size, err := m.VatCleanupBudget[iNdEx].MarshalToSizedBuffer(dAtA[:i])
984
+ if err != nil {
985
+ return 0, err
986
+ }
987
+ i -= size
988
+ i = encodeVarintSwingset(dAtA, i, uint64(size))
989
+ }
990
+ i--
991
+ dAtA[i] = 0x32
992
+ }
993
+ }
875
994
  if len(m.QueueMax) > 0 {
876
995
  for iNdEx := len(m.QueueMax) - 1; iNdEx >= 0; iNdEx-- {
877
996
  {
@@ -1094,6 +1213,46 @@ func (m *QueueSize) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1094
1213
  return len(dAtA) - i, nil
1095
1214
  }
1096
1215
 
1216
+ func (m *UintMapEntry) Marshal() (dAtA []byte, err error) {
1217
+ size := m.Size()
1218
+ dAtA = make([]byte, size)
1219
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
1220
+ if err != nil {
1221
+ return nil, err
1222
+ }
1223
+ return dAtA[:n], nil
1224
+ }
1225
+
1226
+ func (m *UintMapEntry) MarshalTo(dAtA []byte) (int, error) {
1227
+ size := m.Size()
1228
+ return m.MarshalToSizedBuffer(dAtA[:size])
1229
+ }
1230
+
1231
+ func (m *UintMapEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1232
+ i := len(dAtA)
1233
+ _ = i
1234
+ var l int
1235
+ _ = l
1236
+ {
1237
+ size := m.Value.Size()
1238
+ i -= size
1239
+ if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
1240
+ return 0, err
1241
+ }
1242
+ i = encodeVarintSwingset(dAtA, i, uint64(size))
1243
+ }
1244
+ i--
1245
+ dAtA[i] = 0x12
1246
+ if len(m.Key) > 0 {
1247
+ i -= len(m.Key)
1248
+ copy(dAtA[i:], m.Key)
1249
+ i = encodeVarintSwingset(dAtA, i, uint64(len(m.Key)))
1250
+ i--
1251
+ dAtA[i] = 0xa
1252
+ }
1253
+ return len(dAtA) - i, nil
1254
+ }
1255
+
1097
1256
  func (m *Egress) Marshal() (dAtA []byte, err error) {
1098
1257
  size := m.Size()
1099
1258
  dAtA = make([]byte, size)
@@ -1262,6 +1421,12 @@ func (m *Params) Size() (n int) {
1262
1421
  n += 1 + l + sovSwingset(uint64(l))
1263
1422
  }
1264
1423
  }
1424
+ if len(m.VatCleanupBudget) > 0 {
1425
+ for _, e := range m.VatCleanupBudget {
1426
+ l = e.Size()
1427
+ n += 1 + l + sovSwingset(uint64(l))
1428
+ }
1429
+ }
1265
1430
  return n
1266
1431
  }
1267
1432
 
@@ -1330,6 +1495,21 @@ func (m *QueueSize) Size() (n int) {
1330
1495
  return n
1331
1496
  }
1332
1497
 
1498
+ func (m *UintMapEntry) Size() (n int) {
1499
+ if m == nil {
1500
+ return 0
1501
+ }
1502
+ var l int
1503
+ _ = l
1504
+ l = len(m.Key)
1505
+ if l > 0 {
1506
+ n += 1 + l + sovSwingset(uint64(l))
1507
+ }
1508
+ l = m.Value.Size()
1509
+ n += 1 + l + sovSwingset(uint64(l))
1510
+ return n
1511
+ }
1512
+
1333
1513
  func (m *Egress) Size() (n int) {
1334
1514
  if m == nil {
1335
1515
  return 0
@@ -1835,6 +2015,40 @@ func (m *Params) Unmarshal(dAtA []byte) error {
1835
2015
  return err
1836
2016
  }
1837
2017
  iNdEx = postIndex
2018
+ case 6:
2019
+ if wireType != 2 {
2020
+ return fmt.Errorf("proto: wrong wireType = %d for field VatCleanupBudget", wireType)
2021
+ }
2022
+ var msglen int
2023
+ for shift := uint(0); ; shift += 7 {
2024
+ if shift >= 64 {
2025
+ return ErrIntOverflowSwingset
2026
+ }
2027
+ if iNdEx >= l {
2028
+ return io.ErrUnexpectedEOF
2029
+ }
2030
+ b := dAtA[iNdEx]
2031
+ iNdEx++
2032
+ msglen |= int(b&0x7F) << shift
2033
+ if b < 0x80 {
2034
+ break
2035
+ }
2036
+ }
2037
+ if msglen < 0 {
2038
+ return ErrInvalidLengthSwingset
2039
+ }
2040
+ postIndex := iNdEx + msglen
2041
+ if postIndex < 0 {
2042
+ return ErrInvalidLengthSwingset
2043
+ }
2044
+ if postIndex > l {
2045
+ return io.ErrUnexpectedEOF
2046
+ }
2047
+ m.VatCleanupBudget = append(m.VatCleanupBudget, UintMapEntry{})
2048
+ if err := m.VatCleanupBudget[len(m.VatCleanupBudget)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2049
+ return err
2050
+ }
2051
+ iNdEx = postIndex
1838
2052
  default:
1839
2053
  iNdEx = preIndex
1840
2054
  skippy, err := skipSwingset(dAtA[iNdEx:])
@@ -2273,6 +2487,122 @@ func (m *QueueSize) Unmarshal(dAtA []byte) error {
2273
2487
  }
2274
2488
  return nil
2275
2489
  }
2490
+ func (m *UintMapEntry) Unmarshal(dAtA []byte) error {
2491
+ l := len(dAtA)
2492
+ iNdEx := 0
2493
+ for iNdEx < l {
2494
+ preIndex := iNdEx
2495
+ var wire uint64
2496
+ for shift := uint(0); ; shift += 7 {
2497
+ if shift >= 64 {
2498
+ return ErrIntOverflowSwingset
2499
+ }
2500
+ if iNdEx >= l {
2501
+ return io.ErrUnexpectedEOF
2502
+ }
2503
+ b := dAtA[iNdEx]
2504
+ iNdEx++
2505
+ wire |= uint64(b&0x7F) << shift
2506
+ if b < 0x80 {
2507
+ break
2508
+ }
2509
+ }
2510
+ fieldNum := int32(wire >> 3)
2511
+ wireType := int(wire & 0x7)
2512
+ if wireType == 4 {
2513
+ return fmt.Errorf("proto: UintMapEntry: wiretype end group for non-group")
2514
+ }
2515
+ if fieldNum <= 0 {
2516
+ return fmt.Errorf("proto: UintMapEntry: illegal tag %d (wire type %d)", fieldNum, wire)
2517
+ }
2518
+ switch fieldNum {
2519
+ case 1:
2520
+ if wireType != 2 {
2521
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
2522
+ }
2523
+ var stringLen uint64
2524
+ for shift := uint(0); ; shift += 7 {
2525
+ if shift >= 64 {
2526
+ return ErrIntOverflowSwingset
2527
+ }
2528
+ if iNdEx >= l {
2529
+ return io.ErrUnexpectedEOF
2530
+ }
2531
+ b := dAtA[iNdEx]
2532
+ iNdEx++
2533
+ stringLen |= uint64(b&0x7F) << shift
2534
+ if b < 0x80 {
2535
+ break
2536
+ }
2537
+ }
2538
+ intStringLen := int(stringLen)
2539
+ if intStringLen < 0 {
2540
+ return ErrInvalidLengthSwingset
2541
+ }
2542
+ postIndex := iNdEx + intStringLen
2543
+ if postIndex < 0 {
2544
+ return ErrInvalidLengthSwingset
2545
+ }
2546
+ if postIndex > l {
2547
+ return io.ErrUnexpectedEOF
2548
+ }
2549
+ m.Key = string(dAtA[iNdEx:postIndex])
2550
+ iNdEx = postIndex
2551
+ case 2:
2552
+ if wireType != 2 {
2553
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
2554
+ }
2555
+ var stringLen uint64
2556
+ for shift := uint(0); ; shift += 7 {
2557
+ if shift >= 64 {
2558
+ return ErrIntOverflowSwingset
2559
+ }
2560
+ if iNdEx >= l {
2561
+ return io.ErrUnexpectedEOF
2562
+ }
2563
+ b := dAtA[iNdEx]
2564
+ iNdEx++
2565
+ stringLen |= uint64(b&0x7F) << shift
2566
+ if b < 0x80 {
2567
+ break
2568
+ }
2569
+ }
2570
+ intStringLen := int(stringLen)
2571
+ if intStringLen < 0 {
2572
+ return ErrInvalidLengthSwingset
2573
+ }
2574
+ postIndex := iNdEx + intStringLen
2575
+ if postIndex < 0 {
2576
+ return ErrInvalidLengthSwingset
2577
+ }
2578
+ if postIndex > l {
2579
+ return io.ErrUnexpectedEOF
2580
+ }
2581
+ if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
2582
+ return err
2583
+ }
2584
+ iNdEx = postIndex
2585
+ default:
2586
+ iNdEx = preIndex
2587
+ skippy, err := skipSwingset(dAtA[iNdEx:])
2588
+ if err != nil {
2589
+ return err
2590
+ }
2591
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
2592
+ return ErrInvalidLengthSwingset
2593
+ }
2594
+ if (iNdEx + skippy) > l {
2595
+ return io.ErrUnexpectedEOF
2596
+ }
2597
+ iNdEx += skippy
2598
+ }
2599
+ }
2600
+
2601
+ if iNdEx > l {
2602
+ return io.ErrUnexpectedEOF
2603
+ }
2604
+ return nil
2605
+ }
2276
2606
  func (m *Egress) Unmarshal(dAtA []byte) error {
2277
2607
  l := len(dAtA)
2278
2608
  iNdEx := 0
package/x/vbank/README.md CHANGED
@@ -13,6 +13,11 @@ entirely at the ERTP level.
13
13
 
14
14
  - `feeCollectorName`: the module which handles fee distribution to stakers.
15
15
  - `reward_epoch_duration_blocks`: the duration (in blocks) over which fees should be given to the fee collector.
16
+ - `per_epoch_reward_fraction`: a decimal of how much of the `GiveawayPool` is paid as validator rewards per epoch
17
+ - `allowed_monitoring_accounts`: an array of account addresses that can be
18
+ monitored for sends and receives, defaulting to
19
+ `[authtypes.NewModuleAddress(types.ProvisionPoolName)]`. An element of `"*"`
20
+ will permit any address.
16
21
 
17
22
  ## State
18
23
 
@@ -22,7 +27,7 @@ The Vbank module maintains no significant state, but will access stored state th
22
27
 
23
28
  Purse operations which change the balance result in a downcall to this module to update the underlying account. A downcall is also made to query the account balance.
24
29
 
25
- Upon an `EndBlock()` call, the module will scan the block for all `MsgSend` and `MsgMultiSend` events (see `cosmos-sdk/x/bank/spec/04_events.md`) and perform a `VBANK_BALANCE_UPDATE` upcall for all denominations held in *only the mentioned module accounts*.
30
+ Upon an `EndBlock()` call, the module will scan the block for all `MsgSend` and `MsgMultiSend` events (see `cosmos-sdk/x/bank/spec/04_events.md`) and perform a `VBANK_BALANCE_UPDATE` upcall for all denominations held in *only in the allowed_monitoring_accounts*.
26
31
 
27
32
  The following fields are common to the Vbank messages:
28
33
  - `"address"`, `"recipient"`, `"sender"`: account address as a bech32-encoded string
@@ -6,7 +6,6 @@ import (
6
6
  sdk "github.com/cosmos/cosmos-sdk/types"
7
7
 
8
8
  "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"
9
- authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
10
9
  paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
11
10
 
12
11
  vm "github.com/Agoric/agoric-sdk/golang/cosmos/vm"
@@ -88,17 +87,13 @@ func (k Keeper) GetModuleAccountAddress(ctx sdk.Context, name string) sdk.AccAdd
88
87
  return acct.GetAddress()
89
88
  }
90
89
 
91
- func (k Keeper) IsModuleAccount(ctx sdk.Context, addr sdk.AccAddress) bool {
92
- acc := k.accountKeeper.GetAccount(ctx, addr)
93
- if acc == nil {
94
- return false
95
- }
96
- _, ok := acc.(authtypes.ModuleAccountI)
97
- return ok
90
+ func (k Keeper) IsAllowedMonitoringAccount(ctx sdk.Context, addr sdk.AccAddress) bool {
91
+ params := k.GetParams(ctx)
92
+ return params.IsAllowedMonitoringAccount(addr.String())
98
93
  }
99
94
 
100
95
  func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
101
- k.paramSpace.GetParamSet(ctx, &params)
96
+ k.paramSpace.GetParamSetIfExists(ctx, &params)
102
97
  return params
103
98
  }
104
99
 
@@ -0,0 +1,30 @@
1
+ package keeper
2
+
3
+ import (
4
+ "github.com/Agoric/agoric-sdk/golang/cosmos/x/vbank/types"
5
+ sdk "github.com/cosmos/cosmos-sdk/types"
6
+ )
7
+
8
+ // Migrator handles in-place store migrations.
9
+ type Migrator struct {
10
+ keeper Keeper
11
+ }
12
+
13
+ // NewMigrator creates a new Migrator based on the keeper.
14
+ func NewMigrator(keeper Keeper) Migrator {
15
+ return Migrator{keeper: keeper}
16
+ }
17
+
18
+ // Migrate1to2 migrates from version 1 to 2.
19
+ func (m Migrator) Migrate1to2(ctx sdk.Context) error {
20
+ params := m.keeper.GetParams(ctx)
21
+ if params.AllowedMonitoringAccounts != nil {
22
+ return nil
23
+ }
24
+
25
+ defaultParams := types.DefaultParams()
26
+ params.AllowedMonitoringAccounts = defaultParams.AllowedMonitoringAccounts
27
+ m.keeper.SetParams(ctx, params)
28
+
29
+ return nil
30
+ }