Releases: stellar/go
horizonclient v3.2.0 & txnbuild v3.2.0
Horizon 1.4.0
- Drop support for MuxedAccounts strkeys (spec'ed in SEP23).
SEP23 is still a draft and we don't want to encourage storing strkeys which may not be definite. - Replace
SequenceProvider
implementation with one which queries the Horizon DB for sequence numbers instead of the Stellar Core DB. - Use the Horizon DB instead of Horizon's in memory order book graph to query orderbook details for the /order_book endpoint.
- Remove JSON variant of
GET /metrics
, both in the server and client code. It's using Prometheus format by default now. - Decreased memory usage of initial state ingestion stage and state verifier (#2618).
- Remove
--exp-ingest-in-memory-only
Horizon flag. The in memory order book graph which powers the path finding endpoints is now updated using the Horizon DB instead of directly via ingestion (#2630).
horizonclient v3.1.0 & txnbuild v3.1.0
Horizon 1.3.0
Breaking changes
- The type for the following attributes has been changed from
int64
tostring
(#2555):- Attribute
fee_charged
in Transaction resource. - Attribute
max_fee
in Transaction resource.
- Attribute
Changes
- Add
last_modified_time
to account responses.last_modified_time
is the closing time of the most recent ledger in which the account was modified (#2528). - Balances in the Account resource are now sorted by asset code and asset issuer (#2516).
- Ingestion system has its dedicated DB connection pool (#2560).
- A new metric has been added to
/metrics
(#2537 and #2553):ingest.local_latest_ledger
: a gauge with the local latest ledger,txsub.v0
: a meter countingv0
transactions inPOST /transaction
,txsub.v1
: a meter countingv1
transactions inPOST /transaction
,txsub.feebump
: a meter countingfeebump
transactions inPOST /transaction
.
- Fix a memory leak in the code responsible for streaming (#2548, #2575 and #2576).
horizonclient v3.0.1 & txnbuild v3.0.1
- Fix a bug in
txnbuild
which occurs when parsing transactions with manage data operations containing nil values (#2573)
Horizon 1.2.2
- Fix bug which occurs when ingesting ledgers containing both fee bump and normal transactions (#2562).
Horizon 1.2.1
Database migration notes
This version removes two unused columns that could overflow in catchup complete deployments. If your Horizon database contains entire public network history, you should upgrade to this version as soon as possible and run horizon db migrate up
.
Changes
- Remove
id
columns fromhistory_operation_participants
andhistory_transaction_participants
to prevent possible integer overflow #2532.
horizonclient v3.0.0 & txnbuild v3.0.0
txnbuild
Breaking changes
- The
Account
interface has been extended to includeGetSequenceNumber() (int64, error)
. Also,IncrementSequenceNumber()
now returns an(int64, error)
pair instead of a(xdr.SequenceNumber, error)
pair. - Refactor workflow for creating and signing transactions. Previously, you could create a transaction envelope by populating a
Transaction
instance and calling theBuild()
function on theTransaction
instance.
Transaction
is now an opaque type which has accessor functions like SourceAccount() SimpleAccount
, Memo() Memo
, etc. The motivation behind this change is to make Transaction
more immutable. Here is an example of how to use the new transaction type:
kp := keypair.MustParse("SBPQUZ6G4FZNWFHKUWC5BEYWF6R52E3SEP7R3GWYSM2XTKGF5LNTWW4R")
client := horizonclient.DefaultTestNetClient
ar := horizonclient.AccountRequest{AccountID: kp.Address()}
sourceAccount, err := client.AccountDetail(ar)
check(err)
op := txnbuild.Payment{
Destination: "GCCOBXW2XQNUSL467IEILE6MMCNRR66SSVL4YQADUNYYNUVREF3FIV2Z",
Amount: "10",
Asset: NativeAsset{},
}
tx, err := txnbuild.NewTransaction(
txnbuild.TransactionParams{
SourceAccount: &sourceAccount,
// If IncrementSequenceNum is true, NewTransaction() will call `sourceAccount.IncrementSequenceNumber()`
// to obtain the sequence number for the transaction.
// If IncrementSequenceNum is false, NewTransaction() will call `sourceAccount.GetSequenceNumber()`
// to obtain the sequence number for the transaction.
IncrementSequenceNum: true,
Operations: []Operation{&op},
BaseFee: MinBaseFee,
Timebounds: NewInfiniteTimeout(),
},
)
check(err)
tx, err = tx.Sign(network.TestNetworkPassphrase, kp.(*keypair.Full))
TransactionFromXDR
now has the following signatureTransactionFromXDR(txeB64 string) (*GenericTransaction, error)
. AGenericTransaction
is a container which can be unpacked into either aTransaction
or aFeeBumpTransaction
.BuildChallengeTx
now returns aTransaction
instance instead of the base 64 string encoding of the SEP 10 challenge transaction.VerifyChallengeTx
has been removed. UseVerifyChallengeTxThreshold
orVerifyChallengeTxSigners
instead.
Add
- Add
NewFeeBumpTransaction(params FeeBumpTransactionParams) (*FeeBumpTransaction, error)
function for creating fee bump transactions. Note that fee bump transactions will only be accepted by Stellar Core once Protocol 13 is enabled.
Updates
AllowTrust
supports CAP0018 Fine-Grained Control of Authorization by exposing aAuthorizeToMaintainLiabilities
boolean field.ReadChallengeTx
will reject any challenge transactions which are fee bump transactions.ReadChallengeTx
will reject any challenge transactions which contain a MuxedAccount with a memo ID.
Remove
- Dropped support for Go 1.12.
horizonclient
Breaking changes
- The type for the following fields in the
Transaction
struct have changed fromint32
toint64
:FeeCharged
MaxFee
- The
TransactionSuccess
Horizon response has been removed. Instead, all submit transaction functions return with a full HorizonTransaction
response on success. - The
GetSequenceNumber()
andIncrementSequenceNumber()
functions on theAccount
struct now returnint64
values instead ofxdr.SequenceNumber
values.
Add
- Add
IsNotFoundError
- Add
client.SubmitFeeBumpTransaction
andclient.SubmitFeeBumpTransactionWithOptions
for submitting fee bump transactions. Note that fee bump transactions will only be accepted by Stellar Core once Protocol 13 is enabled.
Updates
- To support CAP0018 Fine-Grained Control of Authorization:
- There is a new effect
TrustlineAuthorizedToMaintainLiabilities
which occurs when a trustline has been authorized to maintain liabilities. - The
AuthorizeToMaintainLiabilities
boolean field was added to theAllowTrust
operation struct.
- There is a new effect
- These fields were added to the
Transaction
struct to support fee bump transactions:FeeAccount
(the account which paid the transaction fee)FeeBumpTransaction
(only present in Protocol 13 fee bump transactions)InnerTransaction
(only present in Protocol 13 fee bump transactions).
Transaction
has a newMemoBytes
field which is populated whenMemoType
is equal totext
.MemoBytes
stores the base 64 encoding of the memo bytes set in the transaction envelope.- Fixed a bug where HorizonTimeOut has misleading units of time by:
- Removed HorizonTimeOut (seconds)
- Added HorizonTimeout (nanoseconds)
Horizon 1.2.0
Scheduled Breaking Changes
- The type for the following attributes will be changed from
int64
tostring
in 1.3.0:- Attribute
fee_charged
in Transaction resource. - Attribute
max_fee
in Transaction resource.
- Attribute
The changes are required by CAP-15.
Changes
- Added support for CAP-27 and SEP-23 #2491.
- The XDR definition of a transaction memo is a string. However, XDR strings are actually binary blobs with no enforced encoding. It is possible to set the memo in a transaction envelope to a binary sequence which is not valid ASCII or unicode. Previously, if you wanted to recover the original binary sequence for a transaction memo, you would have to decode the transaction's envelope. In this release, we have added a
memo_bytes
field to the Horizon transaction response for transactions withmemo_type
equaltext
.memo_bytes
stores the base 64 encoding of the memo bytes set in the transaction envelope #2485.
Horizon 1.1.0
IMPORTANT: Database migration
This version includes a significant database migration which changes the column types of fee_charged
and max_fee
in the history_transactions
table from integer
to bigint
. This essential change paves the way for fee bump transactions (CAP 15), a major improvement that will be released soon in Stellar Protocol 13.
This migration will run for a long time, especially if you have a Horizon database with full history. For reference, it took around 8 hours and 42 minutes to complete this migration on a AWS db.r4.xlarge instance with full transaction history.
To execute the migration run horizon db migrate up
using the Horizon v1.1.0 binary.
Important Note: Horizon should not be serving requests or ingesting while the migration is running. For service continuity, if you run a production Horizon deployment it is recommended that you perform the migration on a second instance and then switch over.
Changes
- DB: Remove unnecessary duplicate indexes:
index_history_transactions_on_id
,index_history_ledgers_on_id
,exp_asset_stats_by_code
, andasset_by_code
(#2419). - DB: Remove asset_stats table which is no longer necessary (#2419).
- Validate transaction hash IDs as 64 lowercase hex chars. As such, wrongly-formatted parameters which used to cause 404 (
Not found
) errors will now cause 400 (Bad request
) HTTP errors (#2394). - Fix ask and bid price levels of
GET /order_book
when encountering non-canonical price values. Thelimit
parameter is now respected and levels are coallesced properly. Also,price_r
is now in canonical form (#2400). - Added missing top-level HAL links to the
GET /
response (#2407). - Full transaction details are now included in the
POST /transactions
response. If you submit a transaction and it succeeds, the response will match theGET /transactions/{hash}
response (#2406). - The following attributes are now included in the transaction resource:
fee_account
(the account which paid the transaction fee)fee_bump_transaction
(only present in Protocol 13 fee bump transactions)inner_transaction
(only present in Protocol 13 fee bump transactions) (#2406).
- Add support for CAP0018: Fine-Grained Control of Authorization (Protocol 13) (#2423).
- Add
is_authorized_to_maintain_liabilities
toBalance
."balances": [ { "is_authorized": true, "is_authorized_to_maintain_liabilities": true, "balance": "27.1374422", "limit": "922337203685.4775807", "buying_liabilities": "0.0000000", "selling_liabilities": "0.0000000", "last_modified_ledger": 28893780, "asset_type": "credit_alphanum4", "asset_code": "USD", "asset_issuer": "GBSTRUSD7IRX73RQZBL3RQUH6KS3O4NYFY3QCALDLZD77XMZOPWAVTUK" }, { "balance": "1.5000000", "buying_liabilities": "0.0000000", "selling_liabilities": "0.0000000", "asset_type": "native" } ]
- Add
authorize_to_maintain_liabilities
toAllowTrust
operation.{ "id": "124042211741474817", "paging_token": "124042211741474817", "transaction_successful": true, "source_account": "GBSTRUSD7IRX73RQZBL3RQUH6KS3O4NYFY3QCALDLZD77XMZOPWAVTUK", "type": "allow_trust", "type_i": 7, "created_at": "2020-03-27T03:40:10Z", "transaction_hash": "a77d4ee5346d55fb8026cdcdad6e4b5e0c440c96b4627e3727f4ccfa6d199e94", "asset_type": "credit_alphanum4", "asset_code": "USD", "asset_issuer": "GBSTRUSD7IRX73RQZBL3RQUH6KS3O4NYFY3QCALDLZD77XMZOPWAVTUK", "trustee": "GBSTRUSD7IRX73RQZBL3RQUH6KS3O4NYFY3QCALDLZD77XMZOPWAVTUK", "trustor": "GA332TXN6BX2DYKGYB7FW5BWV2JLQKERNX4T7EUJT4MHWOW2TSGC2SPM", "authorize": true, "authorize_to_maintain_liabilities": true, }
- Add effect
trustline_authorized_to_maintain_liabilities
.{ "id": "0124042211741474817-0000000001", "paging_token": "124042211741474817-1", "account": "GBSTRUSD7IRX73RQZBL3RQUH6KS3O4NYFY3QCALDLZD77XMZOPWAVTUK", "type": "trustline_authorized_to_maintain_liabilities", "type_i": 25, "created_at": "2020-03-27T03:40:10Z", "trustor": "GA332TXN6BX2DYKGYB7FW5BWV2JLQKERNX4T7EUJT4MHWOW2TSGC2SPM", "asset_type": "credit_alphanum4", "asset_code": "USD" }
- Add
- It is no longer possible to use Redis as a mechanism for rate-limiting requests (#2409).