Skip to content

Libplanet 0.9.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Apr 13:07
0.9.0
dd7085a

Released on April 27, 2020.

Backward-incompatible API changes

  • BaseStore class became to implement IDisposable. [#789]
  • Removed IStore.DeleteIndex(Guid, HashDigest<SHA256>) method. [#802]
  • Extension classes was renamed. However, it would not be affected if you have called it by using instance method syntax. [#803]
    • Renamed StunAddressExtension class to StunAddressExtensions.
    • Renamed BytesConvertExtension class to BytesConvertExtensions.
    • Renamed RandomExtension class to RandomExtensions.
    • Renamed AddressExtension class to AddressExtensions.
    • Renamed HashDigestExtension class to HashDigestExtensions.
    • Renamed NetMQFrameExtension class to NetMQFrameExtensions.
    • Renamed NetMQSocketExtension class to NetMQSocketExtensions.
    • Renamed SerializationInfoExtension class to SerializationInfoExtensions.
    • Renamed StoreExtension class to StoreExtensions.
  • All parameters, fields, property, and method return values that had been represented as an Int32 became retyped to AppProtocolVersion. [#266, #815]
    • Swarm() constructor's parameter appProtocolVersion became AppProtocolVersion (was Int32).
    • Peer() and BoundPeer() constructors' parameter appProtocolVersion became AppProtocolVersion (was Int32).
    • Peer.AppProtocolVersion property became AppProtocolVersion (was Int32).
    • DifferentProtocolVersionEventArgs.ExpectedVersion and DifferentProtocolVersionEventArgs.ActualVersion properties became AppProtocolVersion (was Int32).
    • Removed DifferentAppProtocolVersionException class.
  • Swarm() constructor's EventHandler<DifferentProtocolVersionEventArgs> differentVersionPeerEncountered = null parameter became replaced by DifferentAppProtocolVersionEncountered differentAppProtocolVersionEncountered = null parameter. [#266, #815]
  • Added IEnumerable<PublicKey> trustedAppProtocolVersionSigners = null parameter to Swarm() constructor. [#266, #815]
  • Removed DifferentProtocolVersionEventArgs class. [#266, #815]
  • Removed createdAt parameter from Swarm() constructor. [#838]
  • Replaced BlockChain<T>.StageTransactions() with .StageTransaction() that receives only one transaction. [#820]
  • Replaced BlockChain<T>.UnstageTransactions() with .UnstageTransaction() that receives only one transaction. [#820]
  • Added IBlockPolicy.DoesTransactionFollowPolicy() method which is a method to determine if a transaction follows the block policy. [#827]

Backward-incompatible network protocol changes

  • The existing BlockHashes message type (with the type number 0x05) was replaced by a new BlockHashes message type (with type number 0x0e) in order to include an offset block index besides block hashes so that a receiver is able to determine their block indices too. [#707, #798]
  • Peer became to have 3 more fields to represent the whole fields of AppProtocolVersion, which is newly introduced. [#266, #815]
  • The existing RecentStates message type (with the type number 0x0c) was replaced by a new RecentStates message type (with type number 0x0f) in order to compress its states. [#700, #850]

Added APIs

  • Added AddressExtensions.ToAddress(this PrivateKey) overloaded extension method. [#825]
  • Added BlockHashDownloadState class, a subclass of PreloadState. [#707, #798]
  • Added BlockVerificationState class, a subclass of PreloadState. [#798]
  • Added AppProtocolVersion struct. [#266, #815]
  • Added IKeyStore interface. [#831]
  • Added Web3KeyStore class. [#831]
  • Added BlockDigest struct. [#785]
  • Added BlockHeader struct. [#785]
  • Added IStore.GetBlockDigest(HashDigest<SHA256>) method. [#785]
  • Added Block<T>.ToBlockDigest() method. [#785]
  • Added ByteArrayExtensions class. [#803]
  • Added IStore.PruneBlockStates<T>(Guid, Block<T>) method. [#790]
  • Added DifferentAppProtocolVersionEncountered delegate. [#266, #815]
  • Added Swarm<T>.TrustedAppProtocolVersionSigners property. [#266, #815]
  • Added Peer.IsCompatibleWith() method. [#266, #815]
  • Added TxViolatingBlockPolicyException class. [#827]
  • Added KeyStoreException class. [#831]
  • Added NoKeyException class. [#831]

Behavioral changes

  • BlockChain.MineBlock() method became to ignore transactions having lower nonce than the expected nonce in the chain. [#791]
  • Swarm<T>.PreloadAsync() and Swarm<T>.StartAsync() became to download only a list of block hashes first and then download blocks from simultaneously multiple peers. [#707, #798]
  • Improved performance of Swarm<T> by preventing unnecessary task creation. [#817, #837]
  • Improved performance of Swarm<T>.PreloadAsync() by parallelizing connections. [#846]
  • Improved response throughput of Swarm<T>. [#849]

Bug fixes

  • Swarm<T> became not to sync the same Block<T>s or Transaction<T>s multiple times. [#784]
  • Fixed a Swarm<T>'s bug that had broadcasted a message to its source peer when the number of peers is not enough (less than the minimum number). [#788]
  • Fixed a bug where BlockChain.MineBlock() had produced an invalid block when there is any staged transaction which has lower nonce than the expected nonce, that means, shares an already taken nonce by the same signer. [#791]
  • Fixed a Swarm<T>.PreloadAsync() method's bug that temporary chain IDs in the store had been completely cleaned up in some corner cases if cancellationToken was requested. [#798]
  • Fixed a bug where Swarm<T> had crashed if it received invalid Transaction<T> from the nodes. [#820]
  • Fixed a bug where Swarm<T> hadn't reported IProgress<PreloadState>s correctly.[#839]
  • Fixed a Swarm<T>.PreloadAsync() method's bug that it had hung forever when a block failed to be fetched due to an unexpected inner exception. [#839]
  • Fixed a bug where actions had been evaluated twice when receiving blocks. [#843, #844]
  • Fixed OverflowException being thrown when a passphrase containing any non-ASCII characters was passed to Pbkdf2.Derive() method or ProtectedPrivateKey.Protect() method. [#845]

CLI tools

  • Added the planet command and its alias dotnet planet.