stellar-base 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -306,6 +306,15 @@ struct TransactionMetaV1
306
306
  OperationMeta operations<>; // meta for each operation
307
307
  };
308
308
 
309
+ struct TransactionMetaV2
310
+ {
311
+ LedgerEntryChanges txChangesBefore; // tx level changes before operations
312
+ // are applied if any
313
+ OperationMeta operations<>; // meta for each operation
314
+ LedgerEntryChanges txChangesAfter; // tx level changes after operations are
315
+ // applied if any
316
+ };
317
+
309
318
  // this is the meta produced when applying transactions
310
319
  // it does not include pre-apply updates such as fees
311
320
  union TransactionMeta switch (int v)
@@ -314,5 +323,50 @@ case 0:
314
323
  OperationMeta operations<>;
315
324
  case 1:
316
325
  TransactionMetaV1 v1;
326
+ case 2:
327
+ TransactionMetaV2 v2;
328
+ };
329
+
330
+ // This struct groups together changes on a per transaction basis
331
+ // note however that fees and transaction application are done in separate
332
+ // phases
333
+ struct TransactionResultMeta
334
+ {
335
+ TransactionResultPair result;
336
+ LedgerEntryChanges feeProcessing;
337
+ TransactionMeta txApplyProcessing;
338
+ };
339
+
340
+ // this represents a single upgrade that was performed as part of a ledger
341
+ // upgrade
342
+ struct UpgradeEntryMeta
343
+ {
344
+ LedgerUpgrade upgrade;
345
+ LedgerEntryChanges changes;
346
+ };
347
+
348
+ struct LedgerCloseMetaV0
349
+ {
350
+ LedgerHeaderHistoryEntry ledgerHeader;
351
+ // NB: txSet is sorted in "Hash order"
352
+ TransactionSet txSet;
353
+
354
+ // NB: transactions are sorted in apply order here
355
+ // fees for all transactions are processed first
356
+ // followed by applying transactions
357
+ TransactionResultMeta txProcessing<>;
358
+
359
+ // upgrades are applied last
360
+ UpgradeEntryMeta upgradesProcessing<>;
361
+
362
+ // other misc information attached to the ledger close
363
+ SCPHistoryEntry scpInfo<>;
317
364
  };
365
+
366
+ union LedgerCloseMeta switch (int v)
367
+ {
368
+ case 0:
369
+ LedgerCloseMetaV0 v0;
370
+ };
371
+
318
372
  }
@@ -90,7 +90,10 @@ enum MessageType
90
90
  GET_SCP_STATE = 12,
91
91
 
92
92
  // new messages
93
- HELLO = 13
93
+ HELLO = 13,
94
+
95
+ SURVEY_REQUEST = 14,
96
+ SURVEY_RESPONSE = 15
94
97
  };
95
98
 
96
99
  struct DontHave
@@ -99,6 +102,80 @@ struct DontHave
99
102
  uint256 reqHash;
100
103
  };
101
104
 
105
+ enum SurveyMessageCommandType
106
+ {
107
+ SURVEY_TOPOLOGY = 0
108
+ };
109
+
110
+ struct SurveyRequestMessage
111
+ {
112
+ NodeID surveyorPeerID;
113
+ NodeID surveyedPeerID;
114
+ uint32 ledgerNum;
115
+ Curve25519Public encryptionKey;
116
+ SurveyMessageCommandType commandType;
117
+ };
118
+
119
+ struct SignedSurveyRequestMessage
120
+ {
121
+ Signature requestSignature;
122
+ SurveyRequestMessage request;
123
+ };
124
+
125
+ typedef opaque EncryptedBody<64000>;
126
+ struct SurveyResponseMessage
127
+ {
128
+ NodeID surveyorPeerID;
129
+ NodeID surveyedPeerID;
130
+ uint32 ledgerNum;
131
+ SurveyMessageCommandType commandType;
132
+ EncryptedBody encryptedBody;
133
+ };
134
+
135
+ struct SignedSurveyResponseMessage
136
+ {
137
+ Signature responseSignature;
138
+ SurveyResponseMessage response;
139
+ };
140
+
141
+ struct PeerStats
142
+ {
143
+ NodeID id;
144
+ string versionStr<100>;
145
+ uint64 messagesRead;
146
+ uint64 messagesWritten;
147
+ uint64 bytesRead;
148
+ uint64 bytesWritten;
149
+ uint64 secondsConnected;
150
+
151
+ uint64 uniqueFloodBytesRecv;
152
+ uint64 duplicateFloodBytesRecv;
153
+ uint64 uniqueFetchBytesRecv;
154
+ uint64 duplicateFetchBytesRecv;
155
+
156
+ uint64 uniqueFloodMessageRecv;
157
+ uint64 duplicateFloodMessageRecv;
158
+ uint64 uniqueFetchMessageRecv;
159
+ uint64 duplicateFetchMessageRecv;
160
+ };
161
+
162
+ typedef PeerStats PeerStatList<25>;
163
+
164
+ struct TopologyResponseBody
165
+ {
166
+ PeerStatList inboundPeers;
167
+ PeerStatList outboundPeers;
168
+
169
+ uint32 totalInboundPeerCount;
170
+ uint32 totalOutboundPeerCount;
171
+ };
172
+
173
+ union SurveyResponseBody switch (SurveyMessageCommandType type)
174
+ {
175
+ case SURVEY_TOPOLOGY:
176
+ TopologyResponseBody topologyResponseBody;
177
+ };
178
+
102
179
  union StellarMessage switch (MessageType type)
103
180
  {
104
181
  case ERROR_MSG:
@@ -122,6 +199,12 @@ case TX_SET:
122
199
  case TRANSACTION:
123
200
  TransactionEnvelope transaction;
124
201
 
202
+ case SURVEY_REQUEST:
203
+ SignedSurveyRequestMessage signedSurveyRequestMessage;
204
+
205
+ case SURVEY_RESPONSE:
206
+ SignedSurveyResponseMessage signedSurveyResponseMessage;
207
+
125
208
  // SCP
126
209
  case GET_SCP_QUORUMSET:
127
210
  uint256 qSetHash;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stellar-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Fleckenstein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-04 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xdr
@@ -282,6 +282,8 @@ files:
282
282
  - generated/stellar/inflation_result.rb
283
283
  - generated/stellar/inflation_result_code.rb
284
284
  - generated/stellar/ip_addr_type.rb
285
+ - generated/stellar/ledger_close_meta.rb
286
+ - generated/stellar/ledger_close_meta_v0.rb
285
287
  - generated/stellar/ledger_close_value_signature.rb
286
288
  - generated/stellar/ledger_entry.rb
287
289
  - generated/stellar/ledger_entry/data.rb
@@ -340,6 +342,7 @@ files:
340
342
  - generated/stellar/payment_result_code.rb
341
343
  - generated/stellar/peer_address.rb
342
344
  - generated/stellar/peer_address/ip.rb
345
+ - generated/stellar/peer_stats.rb
343
346
  - generated/stellar/price.rb
344
347
  - generated/stellar/public_key.rb
345
348
  - generated/stellar/public_key_type.rb
@@ -358,6 +361,8 @@ files:
358
361
  - generated/stellar/set_options_op.rb
359
362
  - generated/stellar/set_options_result.rb
360
363
  - generated/stellar/set_options_result_code.rb
364
+ - generated/stellar/signed_survey_request_message.rb
365
+ - generated/stellar/signed_survey_response_message.rb
361
366
  - generated/stellar/signer.rb
362
367
  - generated/stellar/signer_key.rb
363
368
  - generated/stellar/signer_key_type.rb
@@ -366,8 +371,13 @@ files:
366
371
  - generated/stellar/stellar_value.rb
367
372
  - generated/stellar/stellar_value/ext.rb
368
373
  - generated/stellar/stellar_value_type.rb
374
+ - generated/stellar/survey_message_command_type.rb
375
+ - generated/stellar/survey_request_message.rb
376
+ - generated/stellar/survey_response_body.rb
377
+ - generated/stellar/survey_response_message.rb
369
378
  - generated/stellar/threshold_indexes.rb
370
379
  - generated/stellar/time_bounds.rb
380
+ - generated/stellar/topology_response_body.rb
371
381
  - generated/stellar/transaction.rb
372
382
  - generated/stellar/transaction/ext.rb
373
383
  - generated/stellar/transaction_envelope.rb
@@ -377,10 +387,12 @@ files:
377
387
  - generated/stellar/transaction_history_result_entry/ext.rb
378
388
  - generated/stellar/transaction_meta.rb
379
389
  - generated/stellar/transaction_meta_v1.rb
390
+ - generated/stellar/transaction_meta_v2.rb
380
391
  - generated/stellar/transaction_result.rb
381
392
  - generated/stellar/transaction_result/ext.rb
382
393
  - generated/stellar/transaction_result/result.rb
383
394
  - generated/stellar/transaction_result_code.rb
395
+ - generated/stellar/transaction_result_meta.rb
384
396
  - generated/stellar/transaction_result_pair.rb
385
397
  - generated/stellar/transaction_result_set.rb
386
398
  - generated/stellar/transaction_set.rb
@@ -391,6 +403,7 @@ files:
391
403
  - generated/stellar/trust_line_entry/ext/v1.rb
392
404
  - generated/stellar/trust_line_entry/ext/v1/ext.rb
393
405
  - generated/stellar/trust_line_flags.rb
406
+ - generated/stellar/upgrade_entry_meta.rb
394
407
  - lib/stellar-base.rb
395
408
  - lib/stellar/account_flags.rb
396
409
  - lib/stellar/asset.rb
@@ -407,6 +420,7 @@ files:
407
420
  - lib/stellar/signer_key.rb
408
421
  - lib/stellar/thresholds.rb
409
422
  - lib/stellar/transaction.rb
423
+ - lib/stellar/transaction_builder.rb
410
424
  - lib/stellar/transaction_envelope.rb
411
425
  - lib/stellar/util/continued_fraction.rb
412
426
  - lib/stellar/util/strkey.rb
@@ -421,6 +435,7 @@ files:
421
435
  - spec/lib/stellar/price_spec.rb
422
436
  - spec/lib/stellar/signer_key_spec.rb
423
437
  - spec/lib/stellar/thresholds_spec.rb
438
+ - spec/lib/stellar/transaction_builder_spec.rb
424
439
  - spec/lib/stellar/transaction_envelope_spec.rb
425
440
  - spec/lib/stellar/transaction_spec.rb
426
441
  - spec/lib/stellar/util/strkey_spec.rb
@@ -437,7 +452,7 @@ files:
437
452
  - xdr/Stellar-overlay.x
438
453
  - xdr/Stellar-transaction.x
439
454
  - xdr/Stellar-types.x
440
- homepage: https://github.com/bloom-solutions/ruby-stellar-base
455
+ homepage: https://github.com/stellar/ruby-stellar-base
441
456
  licenses:
442
457
  - Apache 2.0
443
458
  metadata: {}
@@ -457,8 +472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
457
472
  - !ruby/object:Gem::Version
458
473
  version: '0'
459
474
  requirements: []
460
- rubyforge_project:
461
- rubygems_version: 2.7.9
475
+ rubygems_version: 3.0.3
462
476
  signing_key:
463
477
  specification_version: 4
464
478
  summary: 'Stellar client library: XDR'
@@ -473,6 +487,7 @@ test_files:
473
487
  - spec/lib/stellar/price_spec.rb
474
488
  - spec/lib/stellar/signer_key_spec.rb
475
489
  - spec/lib/stellar/thresholds_spec.rb
490
+ - spec/lib/stellar/transaction_builder_spec.rb
476
491
  - spec/lib/stellar/transaction_envelope_spec.rb
477
492
  - spec/lib/stellar/transaction_spec.rb
478
493
  - spec/lib/stellar/util/strkey_spec.rb