Libplanet 0.9.0
Released on April 27, 2020.
Backward-incompatible API changes
BaseStore
class became to implementIDisposable
. [#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 toStunAddressExtensions
. - Renamed
BytesConvertExtension
class toBytesConvertExtensions
. - Renamed
RandomExtension
class toRandomExtensions
. - Renamed
AddressExtension
class toAddressExtensions
. - Renamed
HashDigestExtension
class toHashDigestExtensions
. - Renamed
NetMQFrameExtension
class toNetMQFrameExtensions
. - Renamed
NetMQSocketExtension
class toNetMQSocketExtensions
. - Renamed
SerializationInfoExtension
class toSerializationInfoExtensions
. - Renamed
StoreExtension
class toStoreExtensions
.
- Renamed
- All parameters, fields, property, and method return values that had been represented as an
Int32
became retyped toAppProtocolVersion
. [#266, #815]Swarm()
constructor's parameterappProtocolVersion
becameAppProtocolVersion
(wasInt32
).Peer()
andBoundPeer()
constructors' parameterappProtocolVersion
becameAppProtocolVersion
(wasInt32
).Peer.AppProtocolVersion
property becameAppProtocolVersion
(wasInt32
).DifferentProtocolVersionEventArgs.ExpectedVersion
andDifferentProtocolVersionEventArgs.ActualVersion
properties becameAppProtocolVersion
(wasInt32
).- Removed
DifferentAppProtocolVersionException
class.
Swarm()
constructor'sEventHandler<DifferentProtocolVersionEventArgs> differentVersionPeerEncountered = null
parameter became replaced byDifferentAppProtocolVersionEncountered differentAppProtocolVersionEncountered = null
parameter. [#266, #815]- Added
IEnumerable<PublicKey> trustedAppProtocolVersionSigners = null
parameter toSwarm()
constructor. [#266, #815] - Removed
DifferentProtocolVersionEventArgs
class. [#266, #815] - Removed
createdAt
parameter fromSwarm()
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 number0x05
) was replaced by a newBlockHashes
message type (with type number0x0e
) 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 ofAppProtocolVersion
, which is newly introduced. [#266, #815]- The existing
RecentStates
message type (with the type number0x0c
) was replaced by a newRecentStates
message type (with type number0x0f
) in order to compress its states. [#700, #850]
Added APIs
- Added
AddressExtensions.ToAddress(this PrivateKey)
overloaded extension method. [#825] - Added
BlockHashDownloadState
class, a subclass ofPreloadState
. [#707, #798] - Added
BlockVerificationState
class, a subclass ofPreloadState
. [#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()
andSwarm<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 sameBlock<T>
s orTransaction<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 ifcancellationToken
was requested. [#798] - Fixed a bug where
Swarm<T>
had crashed if it received invalidTransaction<T>
from the nodes. [#820] - Fixed a bug where
Swarm<T>
hadn't reportedIProgress<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 apassphrase
containing any non-ASCII characters was passed toPbkdf2.Derive()
method orProtectedPrivateKey.Protect()
method. [#845]
CLI tools
- Added the
planet
command and its aliasdotnet planet
.