stellar-base 0.8.0 → 0.9.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -3
- data/generated/stellar-base-generated.rb +3 -0
- data/generated/stellar/authenticated_message.rb +15 -5
- data/generated/stellar/authenticated_message/v0.rb +24 -0
- data/generated/stellar/claim_offer_atom.rb +1 -1
- data/generated/stellar/hello.rb +10 -8
- data/generated/stellar/ledger_entry_change.rb +4 -0
- data/generated/stellar/ledger_entry_change_type.rb +3 -1
- data/generated/stellar/ledger_scp_messages.rb +20 -0
- data/generated/stellar/message_type.rb +7 -3
- data/generated/stellar/peer_address.rb +2 -1
- data/generated/stellar/scp_history_entry.rb +23 -0
- data/generated/stellar/scp_history_entry_v0.rb +20 -0
- data/generated/stellar/scp_statement.rb +8 -9
- data/generated/stellar/scp_statement/pledges.rb +8 -9
- data/generated/stellar/scp_statement/pledges/confirm.rb +8 -6
- data/generated/stellar/scp_statement/pledges/externalize.rb +3 -5
- data/generated/stellar/scp_statement/pledges/prepare.rb +3 -3
- data/generated/stellar/stellar_message.rb +15 -11
- data/lib/stellar/base/version.rb +1 -1
- data/xdr/Stellar-SCP.x +8 -9
- data/xdr/Stellar-ledger.x +30 -1
- data/xdr/Stellar-overlay.x +15 -5
- data/xdr/Stellar-transaction.x +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56dbbad8a7ba7b91b79df49f5002eb6d49c05420
|
4
|
+
data.tar.gz: 40d09c079eefa934a2b89074768e511fcd56e112
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9e3c18fa70289ea4361605170987f2aee62ae9cb2ea1824f12f9b97237343427e51436523e5a8a56ea1c57153d14d188c45e36b49e2ea715ff5911bf86bfe45
|
7
|
+
data.tar.gz: bb265bfba87aa980c82ba40df3b11282ee8d86ae403b17f4762e573a0def806bcdfae37556ddf717ba81e3d97fe8b4aab3fe9ca2608ba2da7ff75f31f103caa6
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Changelog
|
1
|
+
# Changelog
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this
|
4
4
|
file. This project adheres to [Semantic Versioning](http://semver.org/).
|
@@ -6,11 +6,18 @@ file. This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
As this project is pre 1.0, breaking changes may happen for minor version
|
7
7
|
bumps. A breaking change will get clearly notified in this log.
|
8
8
|
|
9
|
-
## [unreleased](https://github.com/stellar/ruby-stellar-base/compare/v0.
|
9
|
+
## [unreleased](https://github.com/stellar/ruby-stellar-base/compare/v0.9.0...master)
|
10
|
+
|
11
|
+
## [0.9.0](https://github.com/stellar/ruby-stellar-base/compare/v0.8.0...v0.9.0)
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- XDR Definitions have been updated to stellar-core commit eed89649c2060b8e9dacffe2cec4e8b258b32416
|
15
|
+
|
16
|
+
## [0.8.0](https://github.com/stellar/ruby-stellar-base/compare/v0.7.0...v0.8.0)
|
10
17
|
|
11
18
|
### Changed
|
12
19
|
- BREAKING CHANGE: The default network for this library is now the stellar test network.
|
13
|
-
To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
|
20
|
+
To enable this library for the production network use `Stellar.default_network = Stellar::Networks::PUBLIC`
|
14
21
|
at the head of your script or in your configuration function.
|
15
22
|
|
16
23
|
## [0.7.0](https://github.com/stellar/ruby-stellar-base/compare/v0.6.1...v0.7.0)
|
@@ -109,6 +109,9 @@ module Stellar
|
|
109
109
|
autoload :TransactionHistoryEntry
|
110
110
|
autoload :TransactionHistoryResultEntry
|
111
111
|
autoload :LedgerHeaderHistoryEntry
|
112
|
+
autoload :LedgerSCPMessages
|
113
|
+
autoload :SCPHistoryEntryV0
|
114
|
+
autoload :SCPHistoryEntry
|
112
115
|
autoload :LedgerEntryChangeType
|
113
116
|
autoload :LedgerEntryChange
|
114
117
|
LedgerEntryChanges = XDR::VarArray[LedgerEntryChange]
|
@@ -5,18 +5,28 @@ require 'xdr'
|
|
5
5
|
|
6
6
|
# === xdr source ============================================================
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# union AuthenticatedMessage switch (uint32 v)
|
9
|
+
# {
|
10
|
+
# case 0:
|
11
|
+
# struct
|
9
12
|
# {
|
10
13
|
# uint64 sequence;
|
11
14
|
# StellarMessage message;
|
12
15
|
# HmacSha256Mac mac;
|
16
|
+
# } v0;
|
13
17
|
# };
|
14
18
|
#
|
15
19
|
# ===========================================================================
|
16
20
|
module Stellar
|
17
|
-
class AuthenticatedMessage < XDR::
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
class AuthenticatedMessage < XDR::Union
|
22
|
+
include XDR::Namespace
|
23
|
+
|
24
|
+
autoload :V0
|
25
|
+
|
26
|
+
switch_on Uint32, :v
|
27
|
+
|
28
|
+
switch 0, :v0
|
29
|
+
|
30
|
+
attribute :v0, V0
|
21
31
|
end
|
22
32
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This code was automatically generated using xdrgen
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# struct
|
9
|
+
# {
|
10
|
+
# uint64 sequence;
|
11
|
+
# StellarMessage message;
|
12
|
+
# HmacSha256Mac mac;
|
13
|
+
# }
|
14
|
+
#
|
15
|
+
# ===========================================================================
|
16
|
+
module Stellar
|
17
|
+
class AuthenticatedMessage
|
18
|
+
class V0 < XDR::Struct
|
19
|
+
attribute :sequence, Uint64
|
20
|
+
attribute :message, StellarMessage
|
21
|
+
attribute :mac, HmacSha256Mac
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/generated/stellar/hello.rb
CHANGED
@@ -9,6 +9,7 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# uint32 ledgerVersion;
|
11
11
|
# uint32 overlayVersion;
|
12
|
+
# uint32 overlayMinVersion;
|
12
13
|
# Hash networkID;
|
13
14
|
# string versionStr<100>;
|
14
15
|
# int listeningPort;
|
@@ -20,13 +21,14 @@ require 'xdr'
|
|
20
21
|
# ===========================================================================
|
21
22
|
module Stellar
|
22
23
|
class Hello < XDR::Struct
|
23
|
-
attribute :ledger_version,
|
24
|
-
attribute :overlay_version,
|
25
|
-
attribute :
|
26
|
-
attribute :
|
27
|
-
attribute :
|
28
|
-
attribute :
|
29
|
-
attribute :
|
30
|
-
attribute :
|
24
|
+
attribute :ledger_version, Uint32
|
25
|
+
attribute :overlay_version, Uint32
|
26
|
+
attribute :overlay_min_version, Uint32
|
27
|
+
attribute :network_id, Hash
|
28
|
+
attribute :version_str, XDR::String[100]
|
29
|
+
attribute :listening_port, XDR::Int
|
30
|
+
attribute :peer_id, NodeID
|
31
|
+
attribute :cert, AuthCert
|
32
|
+
attribute :nonce, Uint256
|
31
33
|
end
|
32
34
|
end
|
@@ -13,6 +13,8 @@ require 'xdr'
|
|
13
13
|
# LedgerEntry updated;
|
14
14
|
# case LEDGER_ENTRY_REMOVED:
|
15
15
|
# LedgerKey removed;
|
16
|
+
# case LEDGER_ENTRY_STATE:
|
17
|
+
# LedgerEntry state;
|
16
18
|
# };
|
17
19
|
#
|
18
20
|
# ===========================================================================
|
@@ -23,9 +25,11 @@ module Stellar
|
|
23
25
|
switch :ledger_entry_created, :created
|
24
26
|
switch :ledger_entry_updated, :updated
|
25
27
|
switch :ledger_entry_removed, :removed
|
28
|
+
switch :ledger_entry_state, :state
|
26
29
|
|
27
30
|
attribute :created, LedgerEntry
|
28
31
|
attribute :updated, LedgerEntry
|
29
32
|
attribute :removed, LedgerKey
|
33
|
+
attribute :state, LedgerEntry
|
30
34
|
end
|
31
35
|
end
|
@@ -9,7 +9,8 @@ require 'xdr'
|
|
9
9
|
# {
|
10
10
|
# LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
|
11
11
|
# LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
|
12
|
-
# LEDGER_ENTRY_REMOVED = 2
|
12
|
+
# LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger
|
13
|
+
# LEDGER_ENTRY_STATE = 3 // value of the entry
|
13
14
|
# };
|
14
15
|
#
|
15
16
|
# ===========================================================================
|
@@ -18,6 +19,7 @@ module Stellar
|
|
18
19
|
member :ledger_entry_created, 0
|
19
20
|
member :ledger_entry_updated, 1
|
20
21
|
member :ledger_entry_removed, 2
|
22
|
+
member :ledger_entry_state, 3
|
21
23
|
|
22
24
|
seal
|
23
25
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This code was automatically generated using xdrgen
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# struct LedgerSCPMessages
|
9
|
+
# {
|
10
|
+
# uint32 ledgerSeq;
|
11
|
+
# SCPEnvelope messages<>;
|
12
|
+
# };
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class LedgerSCPMessages < XDR::Struct
|
17
|
+
attribute :ledger_seq, Uint32
|
18
|
+
attribute :messages, XDR::VarArray[SCPEnvelope]
|
19
|
+
end
|
20
|
+
end
|
@@ -8,7 +8,6 @@ require 'xdr'
|
|
8
8
|
# enum MessageType
|
9
9
|
# {
|
10
10
|
# ERROR_MSG = 0,
|
11
|
-
# HELLO = 1,
|
12
11
|
# AUTH = 2,
|
13
12
|
# DONT_HAVE = 3,
|
14
13
|
#
|
@@ -23,14 +22,17 @@ require 'xdr'
|
|
23
22
|
# // SCP
|
24
23
|
# GET_SCP_QUORUMSET = 9,
|
25
24
|
# SCP_QUORUMSET = 10,
|
26
|
-
# SCP_MESSAGE = 11
|
25
|
+
# SCP_MESSAGE = 11,
|
26
|
+
# GET_SCP_STATE = 12,
|
27
|
+
#
|
28
|
+
# // new messages
|
29
|
+
# HELLO = 13
|
27
30
|
# };
|
28
31
|
#
|
29
32
|
# ===========================================================================
|
30
33
|
module Stellar
|
31
34
|
class MessageType < XDR::Enum
|
32
35
|
member :error_msg, 0
|
33
|
-
member :hello, 1
|
34
36
|
member :auth, 2
|
35
37
|
member :dont_have, 3
|
36
38
|
member :get_peers, 4
|
@@ -41,6 +43,8 @@ module Stellar
|
|
41
43
|
member :get_scp_quorumset, 9
|
42
44
|
member :scp_quorumset, 10
|
43
45
|
member :scp_message, 11
|
46
|
+
member :get_scp_state, 12
|
47
|
+
member :hello, 13
|
44
48
|
|
45
49
|
seal
|
46
50
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# This code was automatically generated using xdrgen
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# union SCPHistoryEntry switch (int v)
|
9
|
+
# {
|
10
|
+
# case 0:
|
11
|
+
# SCPHistoryEntryV0 v0;
|
12
|
+
# };
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class SCPHistoryEntry < XDR::Union
|
17
|
+
switch_on XDR::Int, :v
|
18
|
+
|
19
|
+
switch 0, :v0
|
20
|
+
|
21
|
+
attribute :v0, SCPHistoryEntryV0
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This code was automatically generated using xdrgen
|
2
|
+
# DO NOT EDIT or your changes may be overwritten
|
3
|
+
|
4
|
+
require 'xdr'
|
5
|
+
|
6
|
+
# === xdr source ============================================================
|
7
|
+
#
|
8
|
+
# struct SCPHistoryEntryV0
|
9
|
+
# {
|
10
|
+
# SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages
|
11
|
+
# LedgerSCPMessages ledgerMessages;
|
12
|
+
# };
|
13
|
+
#
|
14
|
+
# ===========================================================================
|
15
|
+
module Stellar
|
16
|
+
class SCPHistoryEntryV0 < XDR::Struct
|
17
|
+
attribute :quorum_sets, XDR::VarArray[SCPQuorumSet]
|
18
|
+
attribute :ledger_messages, LedgerSCPMessages
|
19
|
+
end
|
20
|
+
end
|
@@ -19,24 +19,23 @@ require 'xdr'
|
|
19
19
|
# SCPBallot ballot; // b
|
20
20
|
# SCPBallot* prepared; // p
|
21
21
|
# SCPBallot* preparedPrime; // p'
|
22
|
-
# uint32 nC; //
|
23
|
-
# uint32
|
22
|
+
# uint32 nC; // c.n
|
23
|
+
# uint32 nH; // h.n
|
24
24
|
# } prepare;
|
25
25
|
# case SCP_ST_CONFIRM:
|
26
26
|
# struct
|
27
27
|
# {
|
28
|
+
# SCPBallot ballot; // b
|
29
|
+
# uint32 nPrepared; // p.n
|
30
|
+
# uint32 nCommit; // c.n
|
31
|
+
# uint32 nH; // h.n
|
28
32
|
# Hash quorumSetHash; // D
|
29
|
-
# uint32 nPrepared; // n_p
|
30
|
-
# SCPBallot commit; // c
|
31
|
-
# uint32 nP; // n_P
|
32
33
|
# } confirm;
|
33
34
|
# case SCP_ST_EXTERNALIZE:
|
34
35
|
# struct
|
35
36
|
# {
|
36
|
-
# SCPBallot commit;
|
37
|
-
# uint32
|
38
|
-
# // not from the paper, but useful to build tooling to
|
39
|
-
# // traverse the graph based off only the latest statement
|
37
|
+
# SCPBallot commit; // c
|
38
|
+
# uint32 nH; // h.n
|
40
39
|
# Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
41
40
|
# } externalize;
|
42
41
|
# case SCP_ST_NOMINATE:
|
@@ -14,24 +14,23 @@ require 'xdr'
|
|
14
14
|
# SCPBallot ballot; // b
|
15
15
|
# SCPBallot* prepared; // p
|
16
16
|
# SCPBallot* preparedPrime; // p'
|
17
|
-
# uint32 nC; //
|
18
|
-
# uint32
|
17
|
+
# uint32 nC; // c.n
|
18
|
+
# uint32 nH; // h.n
|
19
19
|
# } prepare;
|
20
20
|
# case SCP_ST_CONFIRM:
|
21
21
|
# struct
|
22
22
|
# {
|
23
|
+
# SCPBallot ballot; // b
|
24
|
+
# uint32 nPrepared; // p.n
|
25
|
+
# uint32 nCommit; // c.n
|
26
|
+
# uint32 nH; // h.n
|
23
27
|
# Hash quorumSetHash; // D
|
24
|
-
# uint32 nPrepared; // n_p
|
25
|
-
# SCPBallot commit; // c
|
26
|
-
# uint32 nP; // n_P
|
27
28
|
# } confirm;
|
28
29
|
# case SCP_ST_EXTERNALIZE:
|
29
30
|
# struct
|
30
31
|
# {
|
31
|
-
# SCPBallot commit;
|
32
|
-
# uint32
|
33
|
-
# // not from the paper, but useful to build tooling to
|
34
|
-
# // traverse the graph based off only the latest statement
|
32
|
+
# SCPBallot commit; // c
|
33
|
+
# uint32 nH; // h.n
|
35
34
|
# Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
36
35
|
# } externalize;
|
37
36
|
# case SCP_ST_NOMINATE:
|
@@ -7,10 +7,11 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# struct
|
9
9
|
# {
|
10
|
+
# SCPBallot ballot; // b
|
11
|
+
# uint32 nPrepared; // p.n
|
12
|
+
# uint32 nCommit; // c.n
|
13
|
+
# uint32 nH; // h.n
|
10
14
|
# Hash quorumSetHash; // D
|
11
|
-
# uint32 nPrepared; // n_p
|
12
|
-
# SCPBallot commit; // c
|
13
|
-
# uint32 nP; // n_P
|
14
15
|
# }
|
15
16
|
#
|
16
17
|
# ===========================================================================
|
@@ -18,10 +19,11 @@ module Stellar
|
|
18
19
|
class SCPStatement
|
19
20
|
class Pledges
|
20
21
|
class Confirm < XDR::Struct
|
21
|
-
attribute :
|
22
|
+
attribute :ballot, SCPBallot
|
22
23
|
attribute :n_prepared, Uint32
|
23
|
-
attribute :
|
24
|
-
attribute :
|
24
|
+
attribute :n_commit, Uint32
|
25
|
+
attribute :n_h, Uint32
|
26
|
+
attribute :quorum_set_hash, Hash
|
25
27
|
end
|
26
28
|
end
|
27
29
|
end
|
@@ -7,10 +7,8 @@ require 'xdr'
|
|
7
7
|
#
|
8
8
|
# struct
|
9
9
|
# {
|
10
|
-
# SCPBallot commit;
|
11
|
-
# uint32
|
12
|
-
# // not from the paper, but useful to build tooling to
|
13
|
-
# // traverse the graph based off only the latest statement
|
10
|
+
# SCPBallot commit; // c
|
11
|
+
# uint32 nH; // h.n
|
14
12
|
# Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
15
13
|
# }
|
16
14
|
#
|
@@ -20,7 +18,7 @@ module Stellar
|
|
20
18
|
class Pledges
|
21
19
|
class Externalize < XDR::Struct
|
22
20
|
attribute :commit, SCPBallot
|
23
|
-
attribute :
|
21
|
+
attribute :n_h, Uint32
|
24
22
|
attribute :commit_quorum_set_hash, Hash
|
25
23
|
end
|
26
24
|
end
|
@@ -11,8 +11,8 @@ require 'xdr'
|
|
11
11
|
# SCPBallot ballot; // b
|
12
12
|
# SCPBallot* prepared; // p
|
13
13
|
# SCPBallot* preparedPrime; // p'
|
14
|
-
# uint32 nC; //
|
15
|
-
# uint32
|
14
|
+
# uint32 nC; // c.n
|
15
|
+
# uint32 nH; // h.n
|
16
16
|
# }
|
17
17
|
#
|
18
18
|
# ===========================================================================
|
@@ -25,7 +25,7 @@ module Stellar
|
|
25
25
|
attribute :prepared, XDR::Option[SCPBallot]
|
26
26
|
attribute :prepared_prime, XDR::Option[SCPBallot]
|
27
27
|
attribute :n_c, Uint32
|
28
|
-
attribute :
|
28
|
+
attribute :n_h, Uint32
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -35,6 +35,8 @@ require 'xdr'
|
|
35
35
|
# SCPQuorumSet qSet;
|
36
36
|
# case SCP_MESSAGE:
|
37
37
|
# SCPEnvelope envelope;
|
38
|
+
# case GET_SCP_STATE:
|
39
|
+
# uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest
|
38
40
|
# };
|
39
41
|
#
|
40
42
|
# ===========================================================================
|
@@ -54,17 +56,19 @@ module Stellar
|
|
54
56
|
switch :get_scp_quorumset, :q_set_hash
|
55
57
|
switch :scp_quorumset, :q_set
|
56
58
|
switch :scp_message, :envelope
|
59
|
+
switch :get_scp_state, :get_scp_ledger_seq
|
57
60
|
|
58
|
-
attribute :error,
|
59
|
-
attribute :hello,
|
60
|
-
attribute :auth,
|
61
|
-
attribute :dont_have,
|
62
|
-
attribute :peers,
|
63
|
-
attribute :tx_set_hash,
|
64
|
-
attribute :tx_set,
|
65
|
-
attribute :transaction,
|
66
|
-
attribute :q_set_hash,
|
67
|
-
attribute :q_set,
|
68
|
-
attribute :envelope,
|
61
|
+
attribute :error, Error
|
62
|
+
attribute :hello, Hello
|
63
|
+
attribute :auth, Auth
|
64
|
+
attribute :dont_have, DontHave
|
65
|
+
attribute :peers, XDR::VarArray[PeerAddress]
|
66
|
+
attribute :tx_set_hash, Uint256
|
67
|
+
attribute :tx_set, TransactionSet
|
68
|
+
attribute :transaction, TransactionEnvelope
|
69
|
+
attribute :q_set_hash, Uint256
|
70
|
+
attribute :q_set, SCPQuorumSet
|
71
|
+
attribute :envelope, SCPEnvelope
|
72
|
+
attribute :get_scp_ledger_seq, Uint32
|
69
73
|
end
|
70
74
|
end
|
data/lib/stellar/base/version.rb
CHANGED
data/xdr/Stellar-SCP.x
CHANGED
@@ -44,24 +44,23 @@ struct SCPStatement
|
|
44
44
|
SCPBallot ballot; // b
|
45
45
|
SCPBallot* prepared; // p
|
46
46
|
SCPBallot* preparedPrime; // p'
|
47
|
-
uint32 nC; //
|
48
|
-
uint32
|
47
|
+
uint32 nC; // c.n
|
48
|
+
uint32 nH; // h.n
|
49
49
|
} prepare;
|
50
50
|
case SCP_ST_CONFIRM:
|
51
51
|
struct
|
52
52
|
{
|
53
|
+
SCPBallot ballot; // b
|
54
|
+
uint32 nPrepared; // p.n
|
55
|
+
uint32 nCommit; // c.n
|
56
|
+
uint32 nH; // h.n
|
53
57
|
Hash quorumSetHash; // D
|
54
|
-
uint32 nPrepared; // n_p
|
55
|
-
SCPBallot commit; // c
|
56
|
-
uint32 nP; // n_P
|
57
58
|
} confirm;
|
58
59
|
case SCP_ST_EXTERNALIZE:
|
59
60
|
struct
|
60
61
|
{
|
61
|
-
SCPBallot commit;
|
62
|
-
uint32
|
63
|
-
// not from the paper, but useful to build tooling to
|
64
|
-
// traverse the graph based off only the latest statement
|
62
|
+
SCPBallot commit; // c
|
63
|
+
uint32 nH; // h.n
|
65
64
|
Hash commitQuorumSetHash; // D used before EXTERNALIZE
|
66
65
|
} externalize;
|
67
66
|
case SCP_ST_NOMINATE:
|
data/xdr/Stellar-ledger.x
CHANGED
@@ -200,13 +200,40 @@ struct LedgerHeaderHistoryEntry
|
|
200
200
|
ext;
|
201
201
|
};
|
202
202
|
|
203
|
+
// historical SCP messages
|
204
|
+
|
205
|
+
struct LedgerSCPMessages
|
206
|
+
{
|
207
|
+
uint32 ledgerSeq;
|
208
|
+
SCPEnvelope messages<>;
|
209
|
+
};
|
210
|
+
|
211
|
+
// note: ledgerMessages may refer to any quorumSets encountered
|
212
|
+
// in the file so far, not just the one from this entry
|
213
|
+
struct SCPHistoryEntryV0
|
214
|
+
{
|
215
|
+
SCPQuorumSet quorumSets<>; // additional quorum sets used by ledgerMessages
|
216
|
+
LedgerSCPMessages ledgerMessages;
|
217
|
+
};
|
218
|
+
|
219
|
+
// SCP history file is an array of these
|
220
|
+
union SCPHistoryEntry switch (int v)
|
221
|
+
{
|
222
|
+
case 0:
|
223
|
+
SCPHistoryEntryV0 v0;
|
224
|
+
};
|
225
|
+
|
203
226
|
// represents the meta in the transaction table history
|
204
227
|
|
228
|
+
// STATE is emitted every time a ledger entry is modified/deleted
|
229
|
+
// and the entry was not already modified in the current ledger
|
230
|
+
|
205
231
|
enum LedgerEntryChangeType
|
206
232
|
{
|
207
233
|
LEDGER_ENTRY_CREATED = 0, // entry was added to the ledger
|
208
234
|
LEDGER_ENTRY_UPDATED = 1, // entry was modified in the ledger
|
209
|
-
LEDGER_ENTRY_REMOVED = 2
|
235
|
+
LEDGER_ENTRY_REMOVED = 2, // entry was removed from the ledger
|
236
|
+
LEDGER_ENTRY_STATE = 3 // value of the entry
|
210
237
|
};
|
211
238
|
|
212
239
|
union LedgerEntryChange switch (LedgerEntryChangeType type)
|
@@ -217,6 +244,8 @@ case LEDGER_ENTRY_UPDATED:
|
|
217
244
|
LedgerEntry updated;
|
218
245
|
case LEDGER_ENTRY_REMOVED:
|
219
246
|
LedgerKey removed;
|
247
|
+
case LEDGER_ENTRY_STATE:
|
248
|
+
LedgerEntry state;
|
220
249
|
};
|
221
250
|
|
222
251
|
typedef LedgerEntryChange LedgerEntryChanges<>;
|
data/xdr/Stellar-overlay.x
CHANGED
@@ -33,6 +33,7 @@ struct Hello
|
|
33
33
|
{
|
34
34
|
uint32 ledgerVersion;
|
35
35
|
uint32 overlayVersion;
|
36
|
+
uint32 overlayMinVersion;
|
36
37
|
Hash networkID;
|
37
38
|
string versionStr<100>;
|
38
39
|
int listeningPort;
|
@@ -62,7 +63,8 @@ struct PeerAddress
|
|
62
63
|
opaque ipv4[4];
|
63
64
|
case IPv6:
|
64
65
|
opaque ipv6[16];
|
65
|
-
}
|
66
|
+
}
|
67
|
+
ip;
|
66
68
|
uint32 port;
|
67
69
|
uint32 numFailures;
|
68
70
|
};
|
@@ -70,7 +72,6 @@ struct PeerAddress
|
|
70
72
|
enum MessageType
|
71
73
|
{
|
72
74
|
ERROR_MSG = 0,
|
73
|
-
HELLO = 1,
|
74
75
|
AUTH = 2,
|
75
76
|
DONT_HAVE = 3,
|
76
77
|
|
@@ -85,7 +86,11 @@ enum MessageType
|
|
85
86
|
// SCP
|
86
87
|
GET_SCP_QUORUMSET = 9,
|
87
88
|
SCP_QUORUMSET = 10,
|
88
|
-
SCP_MESSAGE = 11
|
89
|
+
SCP_MESSAGE = 11,
|
90
|
+
GET_SCP_STATE = 12,
|
91
|
+
|
92
|
+
// new messages
|
93
|
+
HELLO = 13
|
89
94
|
};
|
90
95
|
|
91
96
|
struct DontHave
|
@@ -124,13 +129,18 @@ case SCP_QUORUMSET:
|
|
124
129
|
SCPQuorumSet qSet;
|
125
130
|
case SCP_MESSAGE:
|
126
131
|
SCPEnvelope envelope;
|
132
|
+
case GET_SCP_STATE:
|
133
|
+
uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest
|
127
134
|
};
|
128
135
|
|
129
|
-
|
136
|
+
union AuthenticatedMessage switch (uint32 v)
|
137
|
+
{
|
138
|
+
case 0:
|
139
|
+
struct
|
130
140
|
{
|
131
141
|
uint64 sequence;
|
132
142
|
StellarMessage message;
|
133
143
|
HmacSha256Mac mac;
|
144
|
+
} v0;
|
134
145
|
};
|
135
|
-
|
136
146
|
}
|
data/xdr/Stellar-transaction.x
CHANGED
@@ -315,7 +315,7 @@ struct TransactionEnvelope
|
|
315
315
|
/* This result is used when offers are taken during an operation */
|
316
316
|
struct ClaimOfferAtom
|
317
317
|
{
|
318
|
-
//
|
318
|
+
// emitted to identify the offer
|
319
319
|
AccountID sellerID; // Account that owns the offer
|
320
320
|
uint64 offerID;
|
321
321
|
|
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.
|
4
|
+
version: 0.9.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: 2015-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xdr
|
@@ -260,6 +260,7 @@ files:
|
|
260
260
|
- generated/stellar/auth.rb
|
261
261
|
- generated/stellar/auth_cert.rb
|
262
262
|
- generated/stellar/authenticated_message.rb
|
263
|
+
- generated/stellar/authenticated_message/v0.rb
|
263
264
|
- generated/stellar/bucket_entry.rb
|
264
265
|
- generated/stellar/bucket_entry_type.rb
|
265
266
|
- generated/stellar/change_trust_op.rb
|
@@ -299,6 +300,7 @@ files:
|
|
299
300
|
- generated/stellar/ledger_key/account.rb
|
300
301
|
- generated/stellar/ledger_key/offer.rb
|
301
302
|
- generated/stellar/ledger_key/trust_line.rb
|
303
|
+
- generated/stellar/ledger_scp_messages.rb
|
302
304
|
- generated/stellar/ledger_upgrade.rb
|
303
305
|
- generated/stellar/ledger_upgrade_type.rb
|
304
306
|
- generated/stellar/manage_offer_effect.rb
|
@@ -333,6 +335,8 @@ files:
|
|
333
335
|
- generated/stellar/public_key.rb
|
334
336
|
- generated/stellar/scp_ballot.rb
|
335
337
|
- generated/stellar/scp_envelope.rb
|
338
|
+
- generated/stellar/scp_history_entry.rb
|
339
|
+
- generated/stellar/scp_history_entry_v0.rb
|
336
340
|
- generated/stellar/scp_nomination.rb
|
337
341
|
- generated/stellar/scp_quorum_set.rb
|
338
342
|
- generated/stellar/scp_statement.rb
|