Libplanet 0.5.0
Released on August 22, 2019.
Backward-incompatible interface changes
- Added
IStore.GetBlockIndex()
method. [#385] StoreExtension.LookupStateReference<T>()
method became to returnTuple<HashDigest<SHA256>, long>
which is a nullable tuple ofBlock<T>.Hash
andBlock<T>.Index
. [#350]- Added
IBlockPolicy<T>.BlockAction
property. [#319, #367] - Removed the type parameter of
ActionEvaluation
. [#319, #367] ActionEvaluation.Action
became toIAction
type. [#319, #367]LiteDBStore()
constructor became to have a new option namedflush
and turned on by default. [#387, LiteDB #1268]LiteDBStore()
constructor became to have a new option namedreadOnly
and turned off by default. [#434]BaseIndex.ContainsKey()
method becameabstract
. [#390]BlockDownloadState.TotalBlockCount
andBlockDownloadState.ReceivedBlockCount
became toInt64
type. [#396, #399]IStore.IterateIndex()
method became to receiveoffset
andlimit
parameters. [[#425]]- Added
IStore.GetCanonicalNamespace()
method. [#426] - Added
IStore.SetCanonicalNamespace()
method. [#426] - Removed
IRandom.NextDouble()
method, because floating-point arithmetics, which is underspecified, likely introduce indeterminism. [#410, #419] - Added
IActionContext.NewGuId()
method. [#371, #439] Address(byte[])
became to throwArgumentNullException
instead ofNullReferenceException
. [#443]- Removed
FileStore
class. [#446]
Added interfaces
- Added
trustedStateValidators
option toSwarm<T>.PreloadAsync()
method. If any peer in this set is reachable and there is no built up blockchain in a current node,Swarm<T>
receives the latest states of the major blockchain from that trusted peer, which is also calculated by that peer, instead of autonomously calculating the states from scratch. Note that this option is intended to be exposed to end users through a feasible user interface so that they can decide whom to trust for themselves. [#272, #343] - Added
StoreExtension.ListAllStateReferences(this IStore, string, HashDigest<SHA256>?, HashDigest<SHA256>?)
extension method. [#363, #384, #385] Address
class became to implementIComparable<Address>
andIComparable
interfaces. [#363]- Added
BlockChain<T>.BlockHashes
property. [#389] Swarm<T>.PreloadAsync(IProgress<PreloadState>, IImmutableSet<Address>, CancellationToken)
became to report progress for all phases. [#397, #400]- Added
PreloadState
,ActionExecutionState
,StateReferenceDownloadState
, andBlockStateDownloadState
classes to cover all phases in the entire preloading process. [#397, #400] - Added
Address(ImmutableArray<byte>)
constructor. [#442, #443]
Behavioral changes
BlockChain<T>.PreloadAsync()
method became to omit rendering ofIAction
s in the preloaded behind blocks. [#272, #343]Swarm<T>
became to have two more message types:GetRecentStates
(0x0b
) andRecentStates
(0x0c
). [#272, #343]BlockChain<T>.MineBlock()
andBlockChain<T>.GetNextTxNonce()
methods became to ignore transactions that didn't followTransaction<T>.Nonce
sequentially and treat them as pendings. [#365]BlockChain<T>
became to evaluateIBlockPolicy<T>.BlockAction
and set the state when a block is appended to the chain. [#319, #367]BlockSet<T>.ContainsKey()
andTransactionSet<T>.ContainsKey()
methods became O(1) time complexity through omitting iteration and relying own retrieve implementations. [#390]- The way
LiteDBStore
stores state references became efficient, but the file-level backward compatibility was also broken. [#395, #398] Swarm<T>.PreloadAsync()
method became to report a block downloading progress with the total number of blocks to download in the entire batch, instead of the window size of a chunk (i.e., 500). [#396, #399]Swarm<T>.PreloadAsync()
became to get the first parameter,progress
, which acceptsIProgress<PreloadState>
. [#397, #400]BlockHashes
messages became to contain one more higher hash. [#408, #445]Swarm<T>.PreloadAsync()
became safe from data corruption even if a preloading process suddenly gets shutdown. [#417]FileStore
andLiteDBStore
became to guarantee atomicity of storing transactions. [#413]IStore.PutTransaction<T>()
became to do nothing when it takes theTransaction<T>
more than once. [#413]BlockChain<T>.Swap()
became to omit common block finding whenrender
isfalse
. [#423]PrivateKey(byte[])
constructor became to check validity. [#438]
Bug fixes
- Fixed a bug where the
LiteDBStore.IterateStagedTransactionIds()
returns duplicated transaction ids. [#366] - Fixed a bug that
NullReferenceException
occurred when serializing defaultAddress
. [#369] - Removed unnecessary mutex in
Swarm<T>
to avoid continuous delays in peer registration in some situations. [#375] - Fixed a bug that
TurnClient
had thrownKeyNotFoundException
andIOException
on startup. [#377, #378] - Fixed a
LiteDBStore
bug that blocks or transactions had got corrupted sometimes. Instead,LiteDBStore.GetTransaction()
became possible to returnnull
even for already stored transactions, and for that case, a warning will be logged through Serilog. [#386, #387, LiteDB #1268] - Fixed a bug that
NetworkStreamProxy.StartAsync()
hadn't stopped properly when the connection had reset by a remote peer. [#414] - Fixed a bug that
Swarm<T>
had hung forever after a remote peer had disconnected while receiving. [#416] - Fixed a bug that
Swarm<T>.PreloadAsync()
had been processed even if there is no appropriate peer. [#418] - Fixed a bug that TURN-related tasks hadn't restarted automatically when an exception occurred. [#422]
- Fixed a bug that TURN relay connection had disconnected when preloading took a long time. [#424]