Releases: dahlia/libplanet
Releases · dahlia/libplanet
Libplanet 0.28.2
Released on March 15, 2022.
- (Libplanet.RocksDBStore)
RocksDBStore.GetBlockDigest()
became to silently returnnull
with no misleading error log when it's asked a non-existent block hash. [#1500, [planetarium#1852]]
[#1500]: planetarium#1500 [[planetarium#1852]]: planetarium#1852
Libplanet 0.23.1
Libplanet 0.9.3
Libplanet 0.9.5
Libplanet 0.9.2
Released on May 20, 2020.
- (Libplanet.RocksDBStore) Fixed a memory leak bug in
RocksDBStore
. [#870]
Libplanet 0.9.1
Libplanet 0.9.4
Released on June 2, 2020.
- (Libplanet.RocksDBStore) Fixed a bug that
RocksDBStore.DeleteChainId()
method had thrownKeyNotFoundException
when there's no such chain ID. [#891] - (Libplanet.RocksDBStore) Fixed a bug that
RocksDBStore
had written logs into the incorrect contextDefaultContext
, notRocksDBStore
the correct one. [#891]
Libplanet 0.6.0
Released on October 1, 2019.
Backward-incompatible interface changes
BlockChain<T>.MineBlock()
is nowasync
and became to throwOperationCanceledException
ifBlockChain<T>
's tip index is changed while mining. [#460, #517]- Users became able to give a cancellation token to
Block<T>.Mine()
andHashcash.Answer()
to cancel the operation. [#460, #517] - Replaced
UnexpectedlyTerminatedTxRehearsalException
withUnexpectedlyTerminatedActionException
. [#498] - The following methods became to throw
UnexpectedlyTerminatedActionException
with having itsInnerException
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 withBlockChain<T>
. [#483, #486]- Renamed
IStore.ListNamespaces()
method toListChainIds()
. - Renamed
IStore.DeleteNamespace()
method toDeleteChainId()
. - Renamed
IStore.GetCanonicalNamespace()
method toGetCanonicalChainId()
. - Renamed
IStore.SetCanonicalNamespace(string)
method toSetCanonicalChainId(Guid)
. - Replaced
namespace
/sourceNamespace
/destinationNamespace
parameters takingstring
of methods inIStore
andStoreExtension
withchainId
/sourceChainId
/destinationChainId
takingGuid
. - Renamed
NamespaceNotFoundException
toChainIdNotFoundException
. - Replaced
NamespaceNotFoundException(string, string)
constructor withChainIdNotFoundException(Guid, string)
constructor. - Replaced
NamespaceNotFoundException.Namespace
property withChainIdNotFoundException.ChainId
property.
- Renamed
IStore.StoreStateReference<T>(string, IImmutableSet<Address>, Block<T>)
method became replaced byStoreStateReference(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 fromIStore.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 byStageTransactions(IImmutableSet<Transaction<T>>)
.- Removed
toBroadcast
parameter fromIStore.IterateStagedTransactionIds(bool)
method. IStore.StageTransactionIds(IDictionary<TxId, bool>)
method became replaced byStageTransactionIds(IImmutableSet<TxId>()
.
- Removed
Swarm<T>.AddPeersAsync()
method. To connect with seed peers, useSwarm<T>.BootstrapAsync()
method instead. [#353] Peer
with endpoints should be typed asBoundPeer
which is inherited fromPeer
. [#353]- Removed
IActionContext.NewGuid()
method. To get a randomly generated Guid, useRandomExtension.GenerateRandomGuid()
which implements RFC 4122 instead. [#508]
Added interfaces
- Added
BlockChain<T>.TipChanged
event which is invoked with an argument ofBlockChain<T>.TipChangedEventArgs
whenBlockChain<T>.Tip
is changed. [#517, #526] - Added
BlockChain<T>.TipChangedEventArgs
class. [#526] - Added
Swarm<T>.PrepareAsync()
method. The method should be called before callingSwarm<T>.BootstrapAsync()
,Swarm<T>.PreloadAsync()
andSwarm<T>.StartAsync()
. [#353] - Added
Swarm<T>.BootstrapAsync()
method to connect with seed peers. [#353] - Added
RandomExtension
static class. [#508] TxId
class became to implementIComparable<TxId>
andIComparable
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 internalGetRecentStates
message became to takeBlockLocator
, an internal data type to approximates a path of a chain of blocks for heuristics to search a likely branchpoint, instead ofHashDigest<SHA256>
. [#465, #481]- NetMQ instances are now initialized at
Swarm<T>.StartAsync()
instead ofSwarm<T>()
. [#353] - Peers now connected via Kademlia protocol. Peers are now selectively connected to each peer. [#353]
TxId
s andBlock
s 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 itsInnerAction
for the sake of easier debugging. [#512]- The order of
Block<T>.Transactions
became to be determined by both aBlock<T>.Hash
and aTransaction<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 aBlock<T>.Hash
and a fingerprint derived from all these transactions, and transactions in each group (per signer) are ordered byTransaction<T>.Nonce
. [#244, #355, #511, #520] LiteDBStore()
became to create the database in memory if thepath
parameter isnull
. [#521]
Bug fixes
- Fixed a bug that
Swarm<T>
hadn't released its TURN related resources onSwarm<T>.StopAsync()
. [#450] - Fixed a bug that
IActionContext.Random
had been possible to generated equivalent results between actions of different transactions in aBlock<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]