Skip to content

@github-actions github-actions released this Oct 1, 2019 · 301 commits to master since this release

Released on October 1, 2019.

Backward-incompatible interface changes

  • BlockChain<T>.MineBlock() is now async and became to throw OperationCanceledException if BlockChain<T>'s tip index is changed while mining. [#460, #517]
  • Users became able to give a cancellation token to Block<T>.Mine() and Hashcash.Answer() to cancel the operation. [#460, #517]
  • Replaced UnexpectedlyTerminatedTxRehearsalException with UnexpectedlyTerminatedActionException. [#498]
  • The following methods became to throw UnexpectedlyTerminatedActionException with having its InnerException during actions being evaluated if any action of them throws an exception: [#498]
    • Transaction<T>.EvaluateActions()
    • Transaction<T>.EvaluateActionsGradually()
    • Block<T>.EvaluateActionsPerTx()
    • Block<T>.Evaluate()
    • BlockChain<T>.GetStates(completeStates: true)
  • The concept of "namespaces" in IStore was replaced by "chain IDs" to be consistent with BlockChain<T>. [#483, #486]
    • Renamed IStore.ListNamespaces() method to ListChainIds().
    • Renamed IStore.DeleteNamespace() method to DeleteChainId().
    • Renamed IStore.GetCanonicalNamespace() method to GetCanonicalChainId().
    • Renamed IStore.SetCanonicalNamespace(string) method to SetCanonicalChainId(Guid).
    • Replaced namespace/sourceNamespace/destinationNamespace parameters taking string of methods in IStore and StoreExtension with chainId/sourceChainId/destinationChainId taking Guid.
    • Renamed NamespaceNotFoundException to ChainIdNotFoundException.
    • Replaced NamespaceNotFoundException(string, string) constructor with ChainIdNotFoundException(Guid, string) constructor.
    • Replaced NamespaceNotFoundException.Namespace property with ChainIdNotFoundException.ChainId property.
  • IStore.StoreStateReference<T>(string, IImmutableSet<Address>, Block<T>) method became replaced by StoreStateReference(Guid, IImmutableSet<Address>, HashDigest<SHA256>, long) method so that it takes hash and index of a block instead of an entire block. [#420]
  • Added IStore.ForkBlockIndexes() method. [#420]
  • Removed addressesToStrip parameter from IStore.ForkStateReferences<T>() method. [#454, #467, #509, #522]
  • Removed the concept of "staged transactions that should not be broadcasted," because its primary usage had been to make a transaction of a reward action for a candidate for block miner, and the case became achieved through IBlockPolicy<T>.BlockAction property which was introduced at 0.5.0. All staged transactions became broadcasted. [#319, #470]
    • BlockChain<T>.StageTransactions(IDictionary<Transaction<T>, bool>) method became replaced by StageTransactions(IImmutableSet<Transaction<T>>).
    • Removed toBroadcast parameter from IStore.IterateStagedTransactionIds(bool) method.
    • IStore.StageTransactionIds(IDictionary<TxId, bool>) method became replaced by StageTransactionIds(IImmutableSet<TxId>().
  • Removed Swarm<T>.AddPeersAsync() method. To connect with seed peers, use Swarm<T>.BootstrapAsync() method instead. [#353]
  • Peer with endpoints should be typed as BoundPeer which is inherited from Peer. [#353]
  • Removed IActionContext.NewGuid() method. To get a randomly generated Guid, use RandomExtension.GenerateRandomGuid() which implements RFC 4122 instead. [#508]

Added interfaces

  • Added BlockChain<T>.TipChanged event which is invoked with an argument of BlockChain<T>.TipChangedEventArgs when BlockChain<T>.Tip is changed. [#517, #526]
  • Added BlockChain<T>.TipChangedEventArgs class. [#526]
  • Added Swarm<T>.BootstrapAsync() method to connect with seed peers. [#353]
  • Added RandomExtension static class. [#508]
  • TxId class became to implement IComparable<TxId> and IComparable interfaces. [#244, #511]

Behavioral changes

  • Swarm<T> now broadcasts transactions as soon as new transactions are received. [#463, #496]
  • Swarm<T> now ignores block hashes which already exists. [#461, #484]
  • Swarm<T>.PreloadAsync() method became to download precalculated states of blocks from a likely branchpoint instead of a genesis block from a trusted peer (i.e., trustedStateValidators) where there are branches between peers. [#465, #481]
  • Swarm<T>'s internal GetRecentStates message became to take BlockLocator, an internal data type to approximates a path of a chain of blocks for heuristics to search a likely branchpoint, instead of HashDigest<SHA256>. [#465, #481]
  • NetMQ instances are now initialized at Swarm<T>.StartAsync() instead of Swarm<T>(). [#353]
  • Peers now connected via Kademlia protocol. Peers are now selectively connected to each peer. [#353]
  • TxIds and Blocks are now broadcasted to selected peers from routing table of the host peer. [#353]
  • PolymorphicAction<T>.ToString() method became to show the runtime type of its InnerAction for the sake of easier debugging. [#512]
  • The order of Block<T>.Transactions became to be determined by both a Block<T>.Hash and a Transaction<T>.Id, so that signers cannot predict the order of transactions in a block before it's mined. If there are multiple transactions signed by the same signer in a block these transactions become grouped together and the order is determined by a Block<T>.Hash and a fingerprint derived from all these transactions, and transactions in each group (per signer) are ordered by Transaction<T>.Nonce. [#244, #355, #511, #520]
  • LiteDBStore() became to create the database in memory if the path parameter is null. [#521]

Bug fixes

  • Fixed a bug that Swarm<T> hadn't released its TURN related resources on Swarm<T>.StopAsync(). [#450]
  • Fixed a bug that IActionContext.Random had been possible to generated equivalent results between actions of different transactions in a Block<T>. [#519]
  • Fixed a bug where a forked chain would not be deleted when an exception occurred during fetching block from other peers. [#527, #537, #540]
Assets 3
You can’t perform that action at this time.