Skip to content

Releases: stellar/go

horizonclient v3.2.0 & txnbuild v3.2.0

18 Jun 17:59
93bb6dd
Compare
Choose a tag to compare
  • txnbuild now generates V1 transaction envelopes which are only supported by Protocol 13 (#2640)
  • Add ToXDR() functions for Transaction and FeeBumpTransaction instances which return xdr transaction envelopes without errors (#2651)

Horizon 1.4.0

08 Jun 15:50
d535a79
Compare
Choose a tag to compare
  • 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

15 May 02:40
c57aa7a
Compare
Choose a tag to compare
  • Fix bug which occurs when parsing xdr offers with prices that require more than 7 decimals of precision (#2588)
  • Add AddSignatureBase64 function to both Transaction and FeeBumpTransaction objects for adding a base64-encoded signature. #2586

Horizon 1.3.0

20 May 01:11
820becd
Compare
Choose a tag to compare

Breaking changes

  • The type for the following attributes has been changed from int64 to string (#2555):

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 counting v0 transactions in POST /transaction,
    • txsub.v1: a meter counting v1 transactions in POST /transaction,
    • txsub.feebump: a meter counting feebump transactions in POST /transaction.
  • Fix a memory leak in the code responsible for streaming (#2548, #2575 and #2576).

horizonclient v3.0.1 & txnbuild v3.0.1

11 May 16:24
5b5b4d6
Compare
Choose a tag to compare
  • Fix a bug in txnbuild which occurs when parsing transactions with manage data operations containing nil values (#2573)

Horizon 1.2.2

07 May 20:21
b6be38c
Compare
Choose a tag to compare
  • Fix bug which occurs when ingesting ledgers containing both fee bump and normal transactions (#2562).

Horizon 1.2.1

01 May 08:08
ddb2b85
Compare
Choose a tag to compare

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 from history_operation_participants and history_transaction_participants to prevent possible integer overflow #2532.

horizonclient v3.0.0 & txnbuild v3.0.0

28 Apr 19:47
20797e3
Compare
Choose a tag to compare

txnbuild

Breaking changes

  • The Account interface has been extended to include GetSequenceNumber() (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 the Build() function on the Transaction 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 signature TransactionFromXDR(txeB64 string) (*GenericTransaction, error). A GenericTransaction is a container which can be unpacked into either a Transaction or a FeeBumpTransaction.
  • BuildChallengeTx now returns a Transaction instance instead of the base 64 string encoding of the SEP 10 challenge transaction.
  • VerifyChallengeTx has been removed. Use VerifyChallengeTxThreshold or VerifyChallengeTxSigners 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 a AuthorizeToMaintainLiabilities 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 from int32 to int64:
    • FeeCharged
    • MaxFee
  • The TransactionSuccess Horizon response has been removed. Instead, all submit transaction functions return with a full Horizon Transaction response on success.
  • The GetSequenceNumber() and IncrementSequenceNumber() functions on the Account struct now return int64 values instead of xdr.SequenceNumber values.

Add

  • Add IsNotFoundError
  • Add client.SubmitFeeBumpTransaction and client.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 the AllowTrust operation struct.
  • 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 new MemoBytes field which is populated when MemoType is equal to text. 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

27 Apr 18:06
793ac79
Compare
Choose a tag to compare

Scheduled Breaking Changes

  • The type for the following attributes will be changed from int64 to string in 1.3.0:

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 with memo_type equal text. memo_bytes stores the base 64 encoding of the memo bytes set in the transaction envelope #2485.

Horizon 1.1.0

09 Apr 04:17
2f93e52
Compare
Choose a tag to compare

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, and asset_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. The limit 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 the GET /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 to Balance.
      "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 to AllowTrust 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"
      }    
      
  • It is no longer possible to use Redis as a mechanism for rate-limiting requests (#2409).