Libplanet changelog
Version 4.1.0
Released on March 8, 2024.
Backward-incompatible API changes
- Removed the '#nullable disable' from 3 projects (Action, Common, Explorer). [#3622]
- Removed the '#nullable disable' from the Libplanet.Store project. [#3644]
- Removed the '#nullable disable' from the Libplanet.RocksDBStore project. [#3651]
- Removed
BaseIndex
class and changedBlockSet
base class fromBaseIndex<BlockHash, Block>
toIReadOnlyDictionary<BlockHash, Block>
. [#3686]
Backward-incompatible network protocol changes
- (Libplanet.Net) Changed some types due to removal of 'nullable keyword'.
[#3669]
- Changed
blocks
parameter type ofBranch
class constructor fromIEnumerable<(Block, BlockCommit)>
toIEnumerable<(Block, BlockCommit?)>
. - Changed
AppProtocolVersion.Extra
field type fromIValue
toIValue?
. - Changed
extra
parameter type ofAppProtocolVersion
class constructor fromIValue
toIValue?
. - Changed
extra
parameter type ofAppProtocolVersion.Sign
method fromIValue
toIValue?
.
- Changed
Added APIs
- (Libplanet.Store.Remote) Introduce
Libplanet.Store.Server.RemoteKeyValueService
[#3688] - (Libplanet.Store.Remote) Introduce
Libplanet.Store.Client.RemoteKeyValueStore
[#3688]
Behavioral changes
- (Libplanet.Store) Optimized
ITrie.IterateNodes()
to greatly reduce the amount of memory used. [#3687]
Version 4.0.6
Released on February 22, 2024.
- (Libplanet.Action) Fixed a bug where
FeeCollector.Mortgage()
unintentionally resets accumulatedAccount.TotalUpdatedFungibleAssets
. [#3680]
Version 4.0.5
Released on February 20, 2024.
- (Libplanet.Action) Optimized
ActionEvaluation
by removing redundant commits. [#3675]
Version 4.0.4
Released on February 7, 2024.
- (Libplanet.Explorer) Revert a GraphQL query argument type change to make it compatible with old schema. [#3663]
Version 4.0.3
Released on February 6, 2024.
- (Libplanet.Explorer) Revert GraphQL types to make it more compatible
with old schema. [#3657]
- Rolled back
TxResultType
's name to auto generatedTxResultType
from specifiedTxResult
. - Rolled back
BlockHash
andTxId
to be handled asIDGraphType
instead ofBlockHashType
andTxIdType
in legacy queries. - Rolled back
HashDigest<SHA256>
to be handled asHashDigestSHA256Type
instead ofHashDigestType<T>
in legacy queries.
- Rolled back
Version 4.0.2
Released on February 6, 2024.
- (Libplanet.Net) Changed
AppProtocolVersion.FromToken()
to throw anException
with more details. [#3648] - (Libplanet.Explorer) Updated outdated GraphQL schema. [#3649]
Version 4.0.1
Released on January 26, 2024.
- (Libplanet.Action) Changed
IWorld.SetAccount()
to throw anArgumentException
under certain undesirable circumstances. [#3633]
Version 4.0.0
Released on January 22, 2024.
Backward-incompatible API changes
- Bumped
BlockMetadata.CurrentProtocolVersion
to 5. [#3524] - Removed
BlockChain.GetBalance(Address, Currency, Address)
method. [#3583] - Removed
BlockChain.GetTotalSupply(Currency, Address)
method. [#3583] - (Libplanet.Action) Changed
ActionEvaluator
to acceptIWorld
instead ofIAccount
. [#3462] - (Libplanet.Action)
IActionEvaluation.OutputState
becameIWorld
. (wasIAccount
) [#3462] - (Libplanet.Action)
IAction.Execute()
became to returnIWorld
. (wasIAccount
) [#3462] - (Libplanet.Action)
IActionContext.PreviousState
becameIWorld
. (wasIAccount
) [#3462] - (Libplanet.Action) Following methods in
IFeeCollector
interface became to accept and returnIWorld
. (wasIAccount
) [#3462]IFeeCollector.Mortgage()
IFeeCollector.Refund()
IFeeCollector.Reward()
- (Libplanet.Action)
IBlockChainStates
interface has been overhauled. [#3462, #3583]- Added
IBlockChainStates.GetWorldState(BlockHash?)
method. - Added
IBlockChainStates.GetWorldState(HashDigest<SHA256>?)
method. - Removed
IBlockChainStates.GetAccountState(BlockHash?)
method. - Removed
IBlockChainStates.GetState(Address, BlockHash?)
method. - Removed
IBlockChainStates.GetStates(IReadOnlyList<Address>, BlockHash?)
method. - Removed
IBlockChainStates.GetBalance(Address, Currency, BlockHash?)
method. - Removed
IBlockChainStates.GetTotalSupply(Currency, BlockHash?)
method. - Removed
IBlockChainStates.GetValidatorSet(BlockHash?)
method.
- Added
- (@planetarium/tx) Remove the
T
generic argument ofSignedTx<T>
. [#3512] - (Libplanet.Common) Removed
EnumerableExtensions
class. [#3625, #3626]
Added APIs
- Added
BlockMetadata.LegacyStateVersion
constant. [#3524] - (Libplanet.Action) Added
IWorld
interface and its implementation. [#3462]- Added
World
class.
- Added
- (Libplanet.Action) Added
IWorldDelta
interface. [#3462] - (Libplanet.Action) Added
IWorldState
interface and its implementation. [#3462]- Added
WorldBaseState
class.
- Added
- (Libplanet.Action) Added
ReservedAddresses
static class. [#3462] - (Libplanet.Store) Added
TrieMetadata
class. [#3540] - (Libplanet.Explorer) Added
AccountStateType
class. [#3462] - (Libplanet.Explorer) Added
WorldStateType
class. [#3462] - (Libplanet.Explorer) Added
StateQuery.world
field. [#3462] - (Libplanet.Explorer) Changed
account
andaccounts
query inStateQuery
to be compatible withstateQuery.world
. [#3589]
Version 3.9.6
Released on January 26, 2024.
- (Libplanet.Store) Optimized
TrieStateStore.CopyStates()
to greatly reduce the amount of memory used. [#3634]
Version 3.9.5
Released on January 18, 2024.
- (Libplanet.Store) Changed
IStateStore.Commit()
to return anITrie
with either itsRoot
asnull
or aHashNode
. [#3610] - (Libplanet.Store) Removed
IStateStore.PruneStates()
method. [#3613, #3614]
Version 3.9.4
Released on January 11, 2024.
- (Libplanet.Explorer) Rolled back some changes to the API to be
more compatible with pre-3.9.3 API. [#3600]
- Changed the name
BencodexValueType
toIValueType
. - Changed the name
LegacyBencodexValueType
toBencodexValueType
. - Changed
AddressType.Name
fromaddress
toAddress
. - Changed
BlockHashType.Name
fromblockHash
toBlockHash
. - Changed
PublicKeyType.Name
frompublicKey
toPublicKey
. - Changed
TxIdType.Name
fromtxId
toTxId
.
- Changed the name
Version 3.9.3
Released on January 4, 2024.
Due to changes in #3567, a network ran with a prior version may not
be compatible with this version, specifically, those that ran with
Libplanet 2.0.0 and onwards prior to this release that have included
Transaction
s that aren't compatible with the updated specification in #3567.
- (Libplanet.Explorer) Added
BlockHashType
andTxIdType
. [#3559] - (Libplanet.Explorer) Changed
HashDigestSHA256Type
toHashDigestType<T>
. [#3559] - (Libplanet.Explorer) Changed
BencodexValueType
to inheritObjectGraphType<IValue>
instead ofStringGraphType
. Instead of simply being a hexadecimal representation ofbyte[]
encodedIValue
, now one can choose its representation format. [#3560] - (Libplanet.Explorer) Added
HelperQuery
, a collection of utility like queries. [#3561] - (Libplanet.Explorer) Removed
IRichStore.StoreUpdatedAddressReferences()
andIterateUpdatedAddressReferences()
interface methods. [#3562] - (Libplanet.Explorer) Removed
involvedAddress
argument from allTransactionQuery
query methods. [#3562] - (Libplanet.Explorer) Removed
IRichStore
interface. [#3564] - (Libplanet.Explorer) Removed parameters
mysql-server
,mysql-port
,mysql-username
,mysql-password
, andmysql-database
fromLibplanet.Explorer.Executable
. [#3564] - Changed
TxInvoice
to no longer allow negative values forMaxGasPrice
andGasLimit
. [#3567] - (Libplanet.Explorer) Added
AccountStateType
class. [#3570] - (Libplanet.Explorer) Added
account
andaccounts
query toStateQuery
. [#3570] - (Libplanet.Store) Changed
ShortNode
to no longer inheritBaseNode
.ShortNode.Value
is no longer nullable. [#3572] - (Libplanet.Store) Removed
FullNode()
and addedFullNode.Empty
. [#3573] - (Libplanet.Store) Slightly optimized
ITrie
performance. [#3573] - (Libplanet.Store) Changed
FullNode
to no longer inheritBaseNode
. [#3574] - (Libplanet.Store) Removed
BaseNode
. [#3574] - (Libplanet.Store) Added
ITrie.Remove()
interface method. [#3576] - (Libplanet.Store) Added
FullNode.RemoveChild()
method. [#3576] - (Libplanet.Action) Added
IAccount.RemoveState()
interface method. [#3577] - (Libplanet.Explorer) Added
LegacyBencodexValueType
class that is a copy of an oldBencodexValueType
with its name changed for backwards compatibility. Changed oldstates
query to useLegacyBencodexValueType
instead ofBencodexValueType
. [#3579]
Version 3.9.2
Released on December 15, 2023.
- (Libplanet.RocksDBStore) Added
DBOptions
type parameter toRocksDBKeyValueStore()
. [#3553]
Version 3.9.1
Released on December 8, 2023.
- (Libplanet.Explorer) Added
INCLUDED
toTxStatus
enum. [#3542]
Version 3.9.0
Released on December 5, 2023.
Due to changes in #3529, a network ran with a prior version may not
be compatible with this version, specifically, those that ran with
Libplanet 2.0.0 and onwards prior to this release that have included
Transaction
s that aren't compatible with the updated specification in #3529.
Backward-incompatible API changes
- (Libplanet.Action) Removed unnecessary extension methods: [#3520]
IReadOnlyList<IActionEvaluation>.GetRawTotalDelta()
IReadOnlyList<IAccountDelta>.OrderedSum()
IAccountDelta.ToRawDelta()
IAccount.GetUpdatedStates()
IAccount.GetUpdatedBalances()
IAccount.GetUpdatedTotalSupplies()
- (Libplanet.Action) Changed
IAccount
to no longer trackIAccountDelta
. [#3520] - (Libplanet.Action) Removed
IAccountDelta
as parameter for constructors ofAccount
class. [#3520] - (Libplanet.Action) Removed
hashedSignature
of typebyte[]
parameter fromActionEvaluator.GenerateRandomSeed()
. [#3523] - Changed
TxInvoice
to no longer allow having the null-ness ofMaxGasPrice
andGasLimit
to be different, i.e. either both should be null or both should not be null at the same time. [#3529] - (Libplanet.Action) Removed
IAccountDelta
interface. [#3535] - (Libplanet.Action) Removed
IAccount.Delta
interface property. [#3535] - (Libplanet.Action) Changed constructor
IAccount(IAccountState, IImmutableDictionary<(Address, Currency), BigInteger>)
toIAccount(IAccountState, IImmutableHashSet<(Address, Currency)>)
. [#3537]
Version 3.8.1
Released on November 27, 2023.
- (Libplanet.Net) Fixed a bug where
GossipConsensusMessageCommunicator
does not clear_peerCatchupRounds
onOnStartHeight()
. [#3519] - (Libplanet.Net)
GossipConsensusMessageCommunicator
now filtersConsensusVoteMsg
which height is different from latestContext
. [#3519] - (Libplanet.Action) Fixed a bug where initialization of
AccountMetrics
is absent. [#3521]
Version 3.8.0
Released on November 24, 2023.
Backward-incompatible API changes
- Removed
updatedAddresses
parameter fromBlockChain.MakeTransaction()
[#3480] - Removed
updatedAddresses
parameter fromTransaction.Create()
. [#3480] - Removed
updatedAddresses
parameter from allTxInvoice()
. [#3480] - Removed
Rehearsal
property fromIActionContext
andICommittedActionContext
. [#3485] - (Libplanet.Crypto) Removed
ToAddress()
extension method forPrivateKey
andPublicKey
. [#3486] - (Libplanet.Crypto) Added
Address
property toPrivateKey
andPublicKey
. [#3486]
Backward-incompatible storage format changes
- (Libplanet.Store) Changed
Libplanet.RocksDBStore
to useRocksDb
instead ofRocksDBSharp
. Note Cannot read new version ofLibplanet.RocksDBStore
storage from underLibplanet.RocksDBStore
version 3.6.1. [#1848, #3487]
Added APIs
- (Libplanet.RocksDBStore) Added
RocksDBInstanceType
enum. [#3488] - (Libplanet.RocksDBStore) Changed
RocksDBStore
andRocksDBKeyValueStore
to acceptRocksDBInstanceType
typeinstanceType
parameter instead of@readonly
parameter in their constructor. [#3488, RocksDb Instance Types]
Version 3.7.1
Released on November 21, 2023.
- Ported changes from Libplanet 3.6.1 release. [#3500]
- Ported changes from Libplanet 3.6.2 release. [#3509]
Version 3.7.0
Released on October 27, 2023.
Backward-incompatible API changes
- Added
IBencodable
interface toHashDigest<T>
. [#3455]
Behavioral changes
- Slightly optimized
BlockMarshaler
. [#3454]
Dependencies
- Upgrade Bencodex from 0.14.0 to 0.16.0. [#3461]
- Upgrade Bencodex.Json from 0.11.0 to 0.16.0. [#3461]
Version 3.6.2
Released on November 21, 2023.
- (Libplanet.Net) Changed default
ContextTimeoutOption
values for more consistent and stable consensus. [#3506]
Version 3.6.1
Released on November 20, 2023.
- (Libplanet.Store) Added optional
cache
parameter of typeHashNodeCache
toMerkleTrie()
constructors. [#3495] - (Libplanet.Store) Added
HashNodeCache
class. [#3495] - (Libplanet.Store) Changed internal caching strategy of
TrieStateStore
for read/write optimization. [#3495]
Version 3.6.0
Released on October 6, 2023.
Backward-incompatible API changes
- Changed
IActionEvaluator.Evaluate()
's return type toIReadOnlyList<ICommittedActionEvaluation>
fromIReadOnlyList<IActionEvaluation>
. [#3445] - Changed
BlockChain.DetermineStateRootHash(IActionEvaluator, IPreEvaluationBlock, out IReadOnlyList<IActionEvaluation>)
toBlockChain.DetermineStateRootHash(IActionEvaluator, IPreEvaluationBlock, out IReadOnlyList<ICommittedActionEvaluation>)
. [#3445] - Changed
BlockChain.EvaluateGenesis()
's return type toIReadOnlyList<ICommittedActionEvaluation>
fromIReadOnlyList<IActionEvaluation>
. [#3445] - Changed
BlockChain.EvaluateBlock()
's return type toIReadOnlyList<ICommittedActionEvaluation>
fromIReadOnlyList<IActionEvaluation>
. [#3445] - Removed
StateStoreExtensions
class. [#3323, #3450]
Added APIs
- (Libplanet.Explorer) Added
TxResult.InputState
of typeHashDigest<SHA256>?
. [#3446, #3447] - (Libplanet.Explorer) Added
TxResult.OutputState
of typeHashDigest<SHA256>?
. [#3446, #3447] - (Libplanet.Explorer) Added
offsetStateRootHash
of typeHashDigest<SHA256>?
argument forStateQuery.states
field. [#3448, #3449] - (Libplanet.Explorer) Added
offsetStateRootHash
of typeHashDigest<SHA256>?
argument forStateQuery.balance
field. [#3448, #3449] - (Libplanet.Explorer) Added
offsetStateRootHash
of typeHashDigest<SHA256>?
argument forStateQuery.totalSupply
field. [#3448, #3449] - (Libplanet.Explorer) Added
offsetStateRootHash
of typeHashDigest<SHA256>?
argument forStateQuery.validators
field. [#3448, #3449]
Behavioral changes
IActionEvaluator.Evaluate()
,BlockChain.EvaluateGenesis()
, andBlockChain.EvaluateBlock()
have a side-effect of storing data toIStateStore
when called. [#3445]
Version 3.5.0
Released on October 4, 2023.
Backward-incompatible API changes
- Removed
IActionContext.Random
property. UseIActionContext.GetRandom()
instead. [#3437] - Added
IActionContext.RandomSeed
property. [#3437] - Added
IActionContext.GetRandom()
method. [#3437] - Changed
IActionEvaluator.Evaluate(IPreEvaluationBlock)
toIActionEvaluator.Evaluate(IPreEvaluationBlock, HashDigest<SHA256>)
. [#3438] - Changed
ActionEvaluator
to acceptIStateStore
instead ofIBlockChainStates
[#3439]
Version 3.4.0
Released on September 25, 2023.
Backward-incompatible API changes
- Added
IBlockChainStates.GetAccountState(HashDigest<SHA256>?)
interface method. [#3425] - Removed
TxFailure.ExceptionMetadata
property. [#3428] - Removed
ISerializable
interface fromTxExecution
,TxSuccess
, andTxFailure
. [#3428] - Removed
TxSuccess
andTxFailure
class. [#3429] - Changed
TxExecution
class assealed
fromabstract.
[#3429] - All properties of
TxExecution
exceptBlockHash
andTxId
were overhauled. [#3429] - (Libplanet.Store) Removed
IStore.PutTxExecution(TxSuccess)
andIStore.PutTxExecution(TxFailure)
; addedIStore.PutTxExecution(TxExecution)
. [#3429] - (Libplanet.Explorer) Removed
TxResult.ExceptionName
of typestring?
and addedTxResult.ExceptionNames
of typeList<string?>?
. [#3429] - (Libplanet.Explorer) Removed
TxResult.UpdatedStates
andTxResult.UpdatedFungibleAssets
. [#3429] - Changed
IActionRenderer.RenderAction(IValue, IActionContext, IAccount)
toIActionRenderer.RenderAction(IValue, ICommittedActionContext, HashDigest<SHA256>)
. [#3431] - Changed
IActionRenderer.RenderActionError(IValue, IActionContext, Exception)
toIActionRenderer.RenderActionError(IValue, ICommittedActionContext, Exception)
. [#3431]
Added APIs
- Added
AccountDiff
class. [#3424] - Added
ICommittedActionContext
interface. [#3431] - Added
ICommittedActionEvaluation
interface. [#3431]
Version 3.3.1
Released on September 8, 2023.
- (Libplanet.Store) Fixed a bug where
ITrie.Get()
could wrongly retrieve anIValue
from a non-existent path. [#3420]
Version 3.3.0
Released on September 7, 2023.
Backward-incompatible API changes
- (Libplanet.Store) Removed
ITrie.Commit()
method. [#3392] - (Libplanet.Store) Added
IStateStore.Commit()
method. [#3398] - (Libplanet.Store) Removed
IKeyValueStore.Get(IEnumerable<KeyBytes> keys)
method. [#3362, #3400] - (Libplanet.Store) Added
PathCursor
struct. [#3399] - (Libplanet.Store) Added
Nibbles
struct. [#3399] - (Libplanet.Store) Changed
KeyBytes
to no longer implementIEquatable<byte[]>
andIEquatable<ImmutableArray<byte>>
. [#3402] - (Libplanet.Store) Added
ITrie.GetNode()
method. [#3401] - (Libplanet.Store) Added
ITrie.IterateValues()
method. [#3405] - (Libplanet.Store) Added
ITrie.IterateNodes()
method. [#3405] - (Libplanet.Store) Removed
Secure
option fromTrieStateStore
. [#3407]- Removed
secure
parameter fromTrieStateStore()
. - Removed
ITrie.Secure
property. - Removed
secure
parameter fromMerkleTrie()
. - Removed
secure
parameter fromPathCursor()
.
- Removed
- (Libplanet.Store) Added
ITrie.Diff()
method. [#3410] - (Libplanet.Store) Removed
MerkleTrieExtensions.DifferentNodes()
static method. [#3410] - Removed
IBlockState
interface. [#3413] - Removed
IBlockChainState.GetBlockState()
interface method. [#3413] - Added
IBlockChainState.GetAccountState()
interface method. [#3413] - Added
IAccountState
interface. [#3416] - Added
AccountState
class. [#3416]
Added APIs
- (Libplanet.RocksDBStore)
RocksDBStore
andRocksDBKeyValueStore
became to receive@readonly
parameter in their constructor. If it is true, it opens rocksdb as read-only mode. [#3354, #3356, RocksDB Read Only]
Behavioral changes
- (Libplanet.Store) Changed
ShortNode
to no longer accept emptybyte
arrays. [#3390]
Bug fixes
- (Libplanet.Store) Fixed
Equals()
forFullNode
andShortNode
. [#3377] - (Libplanet.Store) Fixed a bug where adding two
byte
arrays as keys with one being a subsequence of the other would breakMerkleTrie
and lose data. [#3390] - (Libplanet.Store) Fixed a bug where when trying to add a value to
an existing
FullNode
would throw anException
. [#3390] - (Libplanet.Store) Fixed a bug where committing an
ITrie
may return anITrie
with a different path security scheme. [#3401]
Version 3.2.0
Released on August 10, 2023.
Backward-incompatible API changes
- (Libplanet.Action) Renamed
IAccountStateDelta
asIAccount
. [#3337] - (Libplanet.Store) Optimized
MerkleTrie.Get()
. [#3347] - (Libplanet.Types) Removed
TxSuccess.FungibleAssetsDelta
[#3357] - (Libplanet.Explorer) Removed
TxResult.ExceptionMetadata
andTxResult.FungibleAssetsDelta
. [#3357] - (Libplanet.Store) Added
ITrie.Get(KeyBytes)
interface method. [#3359] - (Libplanet.Store) Optimized
MerkleTrie.Get()
by allowing parallel processing when more than 4KeyBytes
keys are given. [#3359]
Version 3.1.2
Released on August 10, 2023.
Version 3.1.1
Released on August 9, 2023.
Version 3.1.0
Released on July 27, 2023.
Backward-incompatible API changes
- Changed
StateStoreExtensions.Commit()
to acceptIImmutableDictionary<KeyBytes, IValue>
instead ofIImmutableDictionary<string, IValue>
. [#3321] - Changed
AccountDeltaExtensions.ToRawDelta()
to returnIImmutableDictionary<KeyBytes, IValue>
instead ofIImmutableDictionary<string, IValue>
. [#3321] - Changed
ActionEvaluatorExtensions.GetRawTotalDelta()
to returnIImmutableDictionary<KeyBytes, IValue>
instead ofIImmutableDictionary<string, IValue>
. [#3321] - Removed
EnumerableMeasurement
class. [#3325] - Removed
KeyValueExtensions
class. [#3325] - Removed
StateStoreExtensions.EncodeKey()
andStateStoreExtensions.DecodeKey()
methods. [#3328] - Removed
StateStoreExtensions.GetStates(IStateStore, HashDigest<SHA256>?, IReadOnlyList<string>)
method. [#3328] - Removed
TrieExtensions.Set(ITrie, IEnumerable<KeyValuePair<string, IValue?>)
method. [#3328] - Removed
KeyBytes(string, Encoding)
constructor. [#3328]
Added APIs
- Added
StateStoreExtensions.GetStates(IStateStore, HashDigest<SHA256>, IReadOnlyList<KeyBytes>)
method. [#3321] - Added
KeyBytes.Encoding
static property. [#3328] - Added
KeyBytes(string)
constructor. [#3328]
Behavioral changes
- Optimized read and write access to
IStateStore
both for memory and speed. [#3321]
Dependencies
Version 3.0.1
Released on July 21, 2023.
- Fixed builds and tests. [#3326]
Version 3.0.0
Released on July 19, 2023.
Backward-incompatible API changes
- (Libplanet.Common) Moved packages from
Libplanet
. [#3300]Libplanet.Serialization
Libplanet.JsonConverters
- (Libplanet.Common) Moved packages from
Libplanet
. [#3314]Libplanet.Misc
- (Libplanet.Crypto) Moved packages from
Libplanet
. [#3314]Libplanet.Crypto
- (Libplanet.Types) Moved packages from
Libplanet
. [#3314]Libplanet.Assets
Libplanet.Blocks
Libplanet.Consensus
Libplanet.Tx
- (Libplanet.Store) Moved packages from
Libplanet
. [#3303]Libplanet.Store
- (Libplanet.Action) Moved packages from
Libplanet
. [#3310]Libplanet.Action
- Removed
IExtractableException
andExtractableException
. [#3304]
Added APIs
- (Libplanet.Net) Added
Gossip.DeniedPeers
property. [#3313]
Behavioral changes
TxFailure
no longer tracksExceptionMetadata
and is always set tonull
even for already storedTxFailure
. [#3304]
Version 2.5.0
Released on July 12, 2023.
Due to changes in [#3272], a network ran with a prior version may not be compatible with this version.
Backward-incompatible API changes
- (Libplanet.Net) Added
Gossip.PublishMessage(MessageContent, IEnumerable<BoundPeer>)
method. [#3206] - (Libplanet.Net) Added
Context.AddMaj23()
method. [#3206] - (Libplanet.Net) Added
Context.GetVoteSetBits()
method. [#3206] - (Libplanet.Net) Added
Context.GetVoteSetBitsResponse()
method. [#3206] - (Libplanet.Net) Added
ConsensusContext.HandleMaj23()
method. [#3206] - (Libplanet.Net) Added
ConsensusContext.HandleVoteSetBits()
method. [#3206] - (Libplanet.Net) Added
ConsensusContext.HandleProposalClaim()
method. [#3206] - Removed
ActionTypeAttribute.ValueOf()
method. [#3267] - Added
Action<Message> validateMessageToReceive
parameter toGossip
's constructor. [#3273] - Added
Action<MessageContent> validateMessageToSend
parameter toGossip
's constructor. [#3273] - Removed
Action<Message> validateMessage
parameter fromGossip
's constructor. [#3273] - Removed
AccountStateGetter
,AccountBalanceGetter
,TotalSupplyGetter
, andValidatorSetGetter
delegates. [#3282] - Removed
IFeeCalculator
interface. [#3283] - Removed
IBlockPolicy.FeeCalculator
interface property. [#3283] - Removed
TxExecution.ActionsLogsList
,TxFailure.ActionsLogsList
, andTxSuccess.ActionsLogsList
properties. [#3291] - (Libplanet.Explorer) Removed
TxResult.ActionsLogsList
property. [#3291] - Removed
IActionContext.Logs
property andIActionContext.PutLog()
method. [#3292] - Removed
IActionEvaluation.Logs
property. [#3292]
Added APIs
- Added
VoteSetBits
and its related classes. [#3206]- Added
VoteSetBits
class. - Added
VoteSetBitsMetadata
class. - (Libplanet.Net) Added
ConsensusVoteSetBitsMsg
class.
- Added
- Added
ProposalClaim
and its related class. [#3206]- Added
ProposalClaim
class. - Added
ProposalClaimMetadata
class. - (Libplanet.Net) Added
ConsensusProposalClaimMsg
class.
- Added
- (Libplanet.Net) Added
ConsensusMaj23Msg
class. [#3206] - (Libplanet.Net) Added enumeration items to
MessageType
enum. [#3206]- Added
ConsensusMaj23Msg
of value0x53
. - Added
ConsensusVoteSetBitsMsg
of value0x54
. - Added
ConsensusProposalClaimMsg
of value0x55
.
- Added
- Added
IActionContext.Logs
interface property. [#3274] - Changed the type for
IActionEvaluation.Logs
toIReadOnlyList<string>
fromList<string>
. [#3274] - Changed the type for
TxExecution.ActionsLogList
toList<IReadOnlyList<string>>?
fromList<List<string>>?
. [#3274] - (Libplanet.Explorer) Changed the type for
TxResult.ActionsLogList
toList<IReadOnlyList<string>>?
fromList<List<string>>?
. [#3274] - (Libplanet.Explorer) Added
BlockType.PreEvaluationHash
field. [#3280, #3281] - (Libplanet.Net) Added
VoteSet.GetAllVotes()
method. [#3288]
Behavioral changes
- (Libplanet.Net)
Context
became to remove its proposal when +2/3 valid votes were collected. [#3206] - Changed
ActionEvaluator
to evaluate allIAction
s in aTransaction
without early termination even if anIAction
throws anException
. [#3272] Gossip.HandleMessageAsync()
now executes_validateMessageToReceive
on given message received. [#3273]Gossip.SendWantAsync()
now executes_validateMessageToReceive
on replies ofWantMessage
. [#3273]Gossip.HandleWantAsync()
now executes_validateMessageToSend
on given message to send as a reply ofWantMessage
. [#3273]GossipConsensusMessageCommunicator
now prevents sending a message with a round other than its own as a reply to aWantMessage
. [#3273]GossipConsensusMessageCommunicator
now executes anti-spam logic when messages are received. [#3273]
Bug fixes
Version 2.4.1
Released on July 14, 2023.
- Slight speed and memory optimization for
ByteUtil.Hex()
. [#3297] - (Libplanet.RocksDBStore) Slight improvement for speed and memory usage. [#3298]
- Upgrade Bencodex from 0.10.0 to 0.11.0. [#3302]
Version 2.4.0
Released on July 3, 2023.
Deprecated APIs
- (Libplanet.Net) Removed
ConsensusContext.BroadcastMessage
property. [#3260]
Backward-incompatible API changes
Vote.BlockHash
property becameBlockHash
type. (wasBlockHash?
) [#3249]VoteMetadata(long, int, BlockHash?, DateTimeOffset, PublicKey, VoteFlag)
constructor becameVoteMetadata(long, int, BlockHash, DateTimeOffset, PublicKey, VoteFlag)
[#3249]- (Libplanet.Net) Renamed
Step
enum toConsensusStep
to remove ambiguity. [#3249] - (Libplanet.Net)
ConsensusProposalMsg
,ConsensusPreVoteMsg
andConsensusPreCommitMsg
became to inheritConsensusVoteMsg
. [#3249] - (Libplanet.Net) Removed
ConsensusMsg.BlockHash
property. [#3249] - (Libplanet.Net) Some enumeration items to
MessageType
enum has modified. [#3249]ConsensusProposal
changed to0x50
(was0x40
).ConsensusVote
changed to0x51
(was0x41
).ConsensusCommit
changed to0x52
(was0x42
).
- (Libplanet.Net) Added
Flag
property toConsensusVoteMsg
abstract class. [#3260] - (Libplanet.Net)
ConsensusProposalMsg
no longer inheritsConsensusVoteMsg
. Instead, inheritsConsensusMsg
. [#3260] - (Libplanet.Net) Added parameter
IConsensusMessageCommunicator consensusMessageCommunicator
toConsensusContext
. [#3260] - (Libplanet.Net) Removed parameter
DelegateBroadcastMessage broadcastMessage
fromConsensusContext
. [#3260] - (Libplanet.Net) Added parameter
IConsensusMessageCommunicator consensusMessageCommunicator
toContext
. [#3260] - (Libplanet.Net) Renamed
Context.BroadcastMessage(ConsensusMsg)
asContext.PublishMessage(ConsensusMsg)
. [#3260] - (Libplanet.Net) Removed constructor of
MessageCache
class. [#3260] - (Libplanet.Explorer) Changed
TxResult.UpdatedStates
's type toIImmutableDictionary<Address, IValue>
fromIImmutableDictionary<Address, IValue?>
. [#3262]
Added APIs
- Added
Maj23
and its related classes. [#3249]- Added
Maj23
class. - Added
Maj23Metadata
class.
- Added
- (Libplanet.Net) Added
VoteSet
class. [#3249] - (Libplanet.Net) Added
HeightVoteSet
class. [#3249] - (Libplanet.Net) Added
ConsensusVoteMsg
abstract class. [#3249] - (Libplanet.Net) Added
InvalidProposalException
class. [#3249] - (Libplanet.Net) Added
InvalidVoteException
class. [#3249] - (Libplanet.Net) Added
InvalidMaj23Exception
class. [#3249] - Added
IAccountDelta.OrderedSum()
extension method. [#3256] - Added
IAccountDelta.ToRawDelta()
extension method. [#3256] - Removed several properties from
IAccountStateDelta
pertaining to the delta part ofIAccountStateDelta
. Access the equivalent data throughIAccountStateDelta.Delta
instead. [#3257]- Removed
IAccountStateDelta.UpdatedAddresses
property. - Removed
IAccountStateDelta.StateUpdatedAddresses
property. - Removed
IAccountStateDelta.UpdatedFungibleAssets
property. - Removed
IAccountStateDelta.UpdatedTotalSupplyCurrencies
property.
- Removed
- Changed
IBlockStates
toIBlockState
. [#3259] - Changed
IBlockChainStates.GetBlockStates()
toIBlockChainStates.GetBlockState()
. [#3259] - Changes
IActionContext.PreviousStates
toIActionContext.PreviousState
. - Changed
IActionEvaluation.OutputStates
toIActionEvaluation.OutputState
. [#3259] - (Libplanet.Net) Added
IConsensusMessageCommunicator
interface and its related classes. [#3260]- (Libplanet.Net) Added
GossipConsensusMessageCommunicator
class. [#3260]
- (Libplanet.Net) Added
- (Libplanet.Net) Added
Gossip.DenyPeer(BoundPeer)
method. [#3260] - (Libplanet.Net) Added
Gossip.AllowPeer(BoundPeer)
method. [#3260] - (Libplanet.Net) Added
Gossip.ClearCache()
method. [#3260] - (Libplanet.Net) Added
Gossip.ClearDenySet(BoundPeer)
method. [#3260]
Behavioral changes
- (Libplanet.Net)
Gossip
now maintains single message cache, and contents of this cache does not decayed by time or new messages. This cache is cleared only byGossip.ClearCache()
method. [#3260] - (Libplanet.Net) There are no mechanism for bootstrapping conensus
any more. Instead, logic change on
Gossip
solves bootstrapping problem. [#3260] - (Libplanet.Net)
Context.Start()
now triggersIConsensusMessageCommunicator.OnStartHeight()
. [#3260] - (Libplanet.Net)
Context.StartRound()
now triggersIConsensusMessageCommunicator.OnStartRound()
. [#3260]
Version 2.3.0
Released on June 28, 2023.
Backward-incompatible API changes
- (@planetarium/tx) Removed some types and functions related to actions
because the concept of
SystemAction
andCustomAction
was removed since 1.1.0 and some system actions were removed since 1.2.0. [#3230]- Removed
encodeUnsignedTxWithCustomActions()
function. - Removed
encodeUnsignedTxWithSystemAction()
function. - Removed
UnsignedTxWithCustomActions
type. - Removed
UnsignedTxWithSystemAction
type. - Removed
encodeMint()
function. - Removed
encodeTransfer()
function. - Removed
encodeSystemAction()
function. - Removed
CustomAction
type. - Removed
SystemAction
type. - Removed
Mint
type. - Removed
Transfer
type. - Added
encodeUnsignedTx()
function. - Added
UnsignedTx
type. signTx(UnsignedTxWithCustomActions | UnsignedTxWithSystemAction)
function's signature becamesignTx(UnsignedTx)
.SignedTx<T extends UnsignedTxWithCustomActions | UnsignedTxWithSystemAction>
's signature becameSignedTx<T extends UnsignedTx>
.
- Removed
- Changed the type for
IAccountStateDelta.UpdatedFungibleAssets
toIImmutableSet<(Address, Currency)>
fromIImmutableDictionary<Address, IImmutableSet<Currency>>
. [#3244] - Changed the type for
IAccountStateDelta.TotalUpdatedFungibleAssets
toIImmutableSet<(Address, Currency)>
fromIImmutableDictionary<Address, IImmutableSet<Currency>>
. [#3244] - Added
IAccountStateDelta.Delta
property. [#3245] - Removed
IValidatorSupportStateDelta
interface. [#3247] - Added
IAccountStateDeltaView.GetValidatorSet()
interface method. [#3247] - Added
IAccountStateDelta.SetValidator()
interface method. [#3247] - Changed the name
IAccountStateDelta.TotalSupplyUpdatedCurrencies
toIAccountStateDelta.UpdatedTotalSupplyCurrencies
. [#3248] - Changed
TxSuccess.UpdatedStates
's type toIImmutableDictionary<Address, IValue>
fromIImmutableDictionary<Address, IValue?>
. [#3248] - Added
IBlockChainStates.GetState()
interface method. [#3250] - Added
IBlockStates.GetState()
interface method. [#3250] - Changed
IBlockStates
to inheritIAccountState
interface. [#3251]
Added APIs
- Added
IAccountDelta
interface and its default implementationAccountDelta
class. [#3245]
Version 2.2.0
Released on June 23, 2023.
Backward-incompatible API changes
- Added
BlockProtocolVersion
property toIActionContext
. [#3228] - Changed
IAccountStateDelta.TransferAsset()
to require additionalIActionContext
parameter. [#3229] - Changed
IAccountStateDelta.MintAsset()
andIAccountStateDelta.BurnAsset()
to each require an additionalIActionContext
parameter. [#3231]
Bug fixes
- Fixed a bug where
IActionContext.BlockProtocolVersion
was not being set properly in #3228.
Version 2.1.1
Released on June 22, 2023.
- Ported changes from Libplanet 2.0.1 release. [#3234]
Version 2.1.0
Released on June 20, 2023.
Backward-incompatible API changes
- All
IBlockChainStates
methods now take nullableBlockHash?
instead ofBlockHash
asoffset
parameter. [#3214] - Removed
IncompleteBlockStatesException
class. [#3214] - Changed
BlockChain
's implementation ofIBlockChainStates
to match interface description. [#3214] - Added
IBlockChainStates.GetBlockStates()
interface method. [#3216]
Added APIs
- Added
IBlockStates
interface and its default implementationBlockStates
. [#3216]
Behavioral changes
- Improved performance of fungible asset APIs on default
IAccountStateDelta
implementation. [#3218]
Bug fixes
- Fixed a bug where
BlockAction
could have unintendedAccountStateDeltaImpl.Signer
during its execution. [#3215]
Version 2.0.1
Released on June 22, 2023.
- (@planetarium/tx) Fixed a bug where an
encodeCurrency
serializedCurrency
in an incompatible way with Libplanet. [#3225]
Version 2.0.0
Released on June 14, 2023.
Backward-incompatible API changes
- Added
IAccountStateDelta.TotalUpdatedFungibleAssets
interface property. [#3208] - Removed
blockAction
parameter fromActionContext()
. [#3209] - Added
ITransaction.MaxGasPrice
property. [#3201] - Added
ITransaction.GasLimit
property. [#3201] Currency.Serialize()
's behavioral is changed. the serialize field is replaced. [#3201]
Added APIs
- Added
FungibleAssetValue.Serialize()
method. [#3201]
Behavioral changes
- Improved performance of
StateStoreExtensions.Commit()
extension method andMerkleTrie.Commit()
method. [#3165] - Improved performance of
HashDigest<T>.DeriveFrom()
static method on .NET Standard 2.1+. [#3165]
Version 1.4.0
Released on June 7, 2023.
Backward-incompatible API changes
- Removed
IBlockChainStates.GetTrie()
interface method. [#3168] - Removed
PolymorphicAction<T>
class. [#3193] - Changed
BlockChain.Create()
to acceptIActionEvaluator
interface instead ofActionEvaluator
object. [#3195] - Removed
blockAction
parameter fromBlockChain.EvaluateGenesis()
,BlockChain.DetermineGenesisStateRootHash()
, andBlockChain.ProposeGenesisBlock()
methods. [#3195]
Version 1.3.0
Released on May 19, 2023.
Backward-incompatible API changes
- Renamed
PreloadState
asBlockSyncState
. [#3154] - Replaced
Swarm<T>.PreloadAsync
's parameterIProgress<PreloadState> progress
asIProgress<BlockSyncState> progress
. [#3154] - Moved
IAccountStateDelta
and relations interface toLibplanet.State
namespace (fromLibplanet.Action
namespace). [#3173] - Changed
BlockChain<T>()
constructors to explicitly require anIBlockChainStates
and anIActionEvaluator
. [#3172] - Changed
BlockChain<T>.DetermineGenesisStateRootHash()
,BlockChain<T>.EvaluateGenesis()
, andBlockChain<T>.ProposeGenesisBlock()
to explicitly requireIActionEvaluator
. [#3172] - Removed type parameter
T
fromBlockChain<T>
class. [#3182] - Removed type parameter
T
fromIBlockPolicy<T>
interface. [#3182] - Removed type parameter
T
fromIStagePolicy<T>
interface. [#3182] - Removed type parameter
T
fromContext<T>
class. [#3183] - Removed type parameter
T
fromConsensusContext<T>
class. [#3183] - Removed type parameter
T
fromConsensusReactor<T>
class. [#3183] - Removed type parameter
T
fromBlockCandidateTable<T>
class. [#3184] - Removed type parameter
T
fromTxCompletion<T>
class. [#3184] - Removed type parameter
T
fromSwarm<T>
class. [#3184] - (Libplanet.Explorer) Removed type parameter
T
requiringT
asIAction
from all classes. [#3185]
Behavioral changes
Gossip
became to store theMessageId
s received through theHaveMessage
instead of immediately replying to them, and send theWantMessage
requests all at once during eachHeartbeatTask
. #3152Swarm<T>.PreloadAsync()
usePullBlocksAsync()
andConsumeBlockCandidates()
. [#3154]Swarm<T>.PreloadAsync()
usesBlockCandidateTable<T>
to cache downloadedBlock
s, instead of storing them on forkedBlockChain<T>
. [#3154]Swarm<T>.PullBlocksAsync()
andSwarm<T>.GetDemandBlockHashes()
iterates using new parameterchunkSize
. [#3154]Swarm<T>.ConsumeBlockCandidates()
repeats iff new parametercheckInterval
is not null. [#3154]Swarm<T>.ConsumeBlockCandidates()
does not renders if new parameterrender
isfalse
. [#3154]Swarm<T>.PullBlocksAsync()
andSwarm<T>.GetDemandBlockHashes()
receives new parameterIProgress<BlockSyncState> progress
and will report progress to it, if it's given. [#3154]- Moved creation of
BlockDemandTable
andBlockCandidateTable
to constructor ofSwarm<T>
fromSwarm<T>.StartAsync()
. [#3154]
Version 1.2.1
Released on May 17, 2023.
- (Libplanet.Explorer) Fixed a bug where a
TransactionQuery
could not properly retrieve actions. [#3174]
Version 1.2.0
Released on May 16, 2023.
Deprecated APIs
- Removed
StaticActionLoader
class. UseSingleActionLoader
instead. [#3148] - Removed
Mint
andTransfer
class. [#3159]
Backward-incompatible API changes
- Removed type parameter
T
fromTransaction.Create<T>()
andPreEvaluationBlock.Evaluate<T>()
. [#3122] - Signatures of
IActionRenderer<T>
's methods was changed. [#3117]- The signature of
RenderAction(IAction, IActionContext, IAccountStateDelta)
method was changed toRenderAction(IValue, IActionContext, IAccountStateDelta)
. - The signature of
RenderActionError(IAction, IActionContext, Exception)
method was changed toRenderActionError(IValue, IActionContext, Exception)
.
- The signature of
- Added
SingleActionLoader
,TypedActionLoader
, andIndexedActionLoader
classes. [#3148] - Removed
trieGetter
parameter fromActionEvaluator
constructor. [#3149] - Added
IBlockChainStates.GetTrie()
interface method. [#3149] BlockChain<T>.Create()
static method now requiresactionEvaluator
parameter explicitly. [#3149]- Removed
IBlockPolicy.NativeTokens
property. [#3153]- Removed
NonNativeTokenException
class. - Removed
IActionContext.IsNativeToken()
method. - Removed
nativeTokenPredicate
parameter fromActionEvaluator()
- Removed
nativeTokenPredicate
parameter from allBlockChain<T>
's methods. - (Libplanet.Explorer) Removed
BlockPolicyType<T>
class.
- Removed
- Removed generic type parameter
T
fromIRenderer<T>
and all its implementations. [#3163] - Removed
IActionContext.GenesisHash
property. [#3164] - Removed
genesisHash
parameter fromActionEvaluator()
. [#3164]
Added APIs
- Added
IActionContext.GasUsed()
method. [#3144] - Added
IActionContext.GasLimit()
method. [#3144] - Added
PolymorphicAction<T>.ReloadLoader()
static method. [#3158]
Behavioral changes
Transaction.Create()
method no more fillsTransaction.UpdatedAddresses
automatically. [#368, #3122]Mint
andTransfer
IAction
s no longer check for native tokens. [#3153]
Version 1.1.1
Released on May 15, 2023.
- (@planetarium/cli) Fixed the installer bug that it had failed on Linux and macOS since version 1.0.2. [#3107, #3160, #3161]
Version 1.1.0
Released on May 9, 2023.
Backward-incompatible API changes
- Changed the encoding scheme and related methods for
TxActionList
. [#3083]- Removed
TxActionList.FromBencodex<T>()
method. - Changed the return type for
TxActionList.ToBencodex()
fromDictionary
toIValue
.
- Removed
- Removed
IRenderer<T>.RenderReorg()
,IRenderer<T>.RenderReorgEnd()
,IActionRenderer<T>.UnrenderAction()
, andIActionRenderer<T>.UnrenderActionError()
. [#3092] - Removed
NonblockRenderer
,NonblockActionRenderer
,DelayedRenderer
, andDelayedActionRenderer
classes. [#3098] - (Libplanet.Net) Removed optional
render
parameter from allSwarm<T>.PreloadAsync()
overload methods. No rendering is done during the preloading phase. [#3108] TxActionList
now implementsIBencodable
interface. [#3110]- Removed
FromBencodex()
static method; useTxActionList(IValue)
constructor instead. - Removed
ToBencodex()
method; useTxActionList.Bencoded
instead.
- Removed
TxActionList
now implementsIEnumerable<IValue>
instead ofIEnumerable<IAction>
. [#3110]- Changed
TxSystemAction.SystemAction
to return anIValue
. - Changed
TxCustomActions.CustomActions
to return anIImmutableList<IValue>
.
- Changed
TxActionList
's JSON representation has changed. It no longer has"type"
field. [#3110]- Changed the type for
ActionTypeAttribute.TypeIdentifier
fromstring
toIValue
. [#3111] - Changed the return type for
ActionTypeAttribute.ValueOf()
fromstring?
toIValue?
. [#3111] - Changed the return type for
IActionTypeLoader.Load()
fromIDictionary<string, Type>
toIDictionary<IValue, Type>
. [#3111] - Changed return types and parameter types of several methods from
IReadOnlyList<ActionEvaluation>
toIReadOnlyList<IActionEvaluation>
. [#3089]BlockChain<T>.DetermineGenesisStateRootHash()
method'sevaluations
parameter type.BlockChain<T>.DetermineBlockStateRootHash()
method'sevaluations
parameter type.BlockChain<T>.EvaluateBlock()
method's return type.BlockChain<T>.EvaluateGenesis()
method's return type.
- Removed
BlockChain<T>.MakeTransaction(PrivateKey, IAction, IImmutableSet<Address>, DateTimeOffset?)
. [#3116] - Removed
Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?)
. [#3116] - Added
Transaction<T>.Create(long, PrivateKey, BlockHash?, IEnumerable<IValue>, IImmutableSet<Address>?, DateTimeOffset?)
. [#3116] - Removed
ITransaction.SystemAction
andITransaction.CustomActions
. UseITxInvoice.Actions
instead. [#3116] - Overhauled
TxActionList
class. [#3116]- Changed
TxActionList
class to besealed
fromabstract
.TxActionList
is pretty much the oldTxCustomActionsList
. - Changed the JSON representation of
TxActionList
to be more simple. - Removed
TxSystemActionList
andTxCustomActionsList
- Changed
- Changed
Transaction<T>
toTransaction
to be non-generic. [#3121] - Changed
Block<T>
toBlock
to be non-generic. [#3123]- Removed
IBlockContent<T>
interface. UseIBlockContent
instead. Also changedIBlockContent.IImmutableSet<ITransaction>
toIBlockContent.ReadOnlyList<ITransaction>
. - Changed
BlockContent<T>
toBlockContent
. - Removed
IPreEvaluationBlock<T>
interface. UseIPreEvaluationBlock
instead. - Changed
PreEvaluationBlock<T>
toPreEvaluationBlock
.PreEvaluationBlock.Evaluate<T>()
now requires type parameterT
.
- Removed
- Removed
PreEvaluationBlock.Evaluate<T>()
method. [#3127] - Renamed
IActionTypeLoader
toIActionLoader
. [#3135]- Added
IActionLoader.Load(long, IValue)
interface method. - Removed
ActionTypeLoaderContext
class. Uselong
instead. - Renamed
StaticActionTypeLoader
toStaticActionLoader
.
- Added
- Added
IActionEvaluator.IActionLoader
property. [#3136] - Changed
IActionLoader.LoadAction()
to throwInvalidActionException
instead ofArgumentException
when an action cannot be instantiated. [#3140]
Added APIs
- Added
IActionEvaluator
interface. [#3082] - Added
SwarmOptions.TaskRegulationOptions
property. [[#3109]] - Added
TaskRegulationOptions
class. [[#3109]] - Added
ActionTypeAttribute(int)
constructor. [#3111] - Added
IActionEvaluation
interface. [#3089] - Added parameterless constructor to
Mint
,Transfer
, andInitialize
. [#3112] - Added
InvalidActionException
class. [#3140]
Behavioral changes
- Changed
BlockChain<T>
to ignoreIRenderer<T>.RenderReorg()
,IRenderer<T>.RenderReorgEnd()
,IActionRenderer<T>.UnrenderAction()
, andIActionRenderer<T>.UnrenderActionError()
, i.e., these interface methods are no longer invoked by aBlockChain<T>
. [#3087] - Changed
Context<T>.ConsumeMutation()
to iteratively callContext<T>.ProcessGenericUponRules()
itself, instead of producing submutations of it. [#3137] - (Libplanet.Explorer) The
CurrencyInputType
'stotalSupplyTrackable
field became nullable withfalse
as its default value. [#3151]
Bug fixes
- Fixes a bug where
BlockChain<T>
could not propose if a certain type of invalidTransaction
was staged. [#3136] - Fixes a bug where
Context<T>
would completely halt if aBlock
with anIValue
as one of its action that cannot be instantiated via itsIActionLoader
. [#3140]
Dependencies
Version 1.0.3
Released on May 15, 2023.
- (@planetarium/cli) Fixed the installer bug that it had failed on Linux and macOS since version 1.0.2. [#3107, #3160]
Version 1.0.2
Released on May 4, 2023.
- (Libplanet.Tools) The
planet
command now falls back to the default cryptography backend instead of crash when it fails to load libsecp256k1 at runtime. [#3138] - (@planetarium/cli) Fixed the installer bug that it had failed with some recent Node.js versions on Windows. [#3107, #3138]
Version 1.0.1
Released on May 3, 2023.
- Fixed a bug where
BlockChain<T>.Append()
hadn't update tx executions evenevaluateActions
set totrue
whenactionEvaluations
are given. [#3125] - (Libplanet.Explorer) Fixed a bug where
BlockQuery.blocks
field had thrownKeyNotFoundException
when appending block simultaneously. [#3126, #3130]
Version 1.0.0
Released on April 18, 2023.
Deprecated APIs
- (@planerarium/account) Deprecated
RawPrivateKey.publicKey
property in favour ofRawPrivateKey.getPublicKey()
async method. [#3061] - (@planetarium/account-aws-kms) Deprecated
AwsKmsAccount.publicKey
in favour ofAwsKmsAccount.getPublicKey()
async method. [#3061]
Backward-incompatible API changes
- Removed
TxMetadata
class. [#1164, #2986]- Removed
Transaction<T>(TxMetadata, IAction, byte[])
constructor. - Removed
Transaction<T>(TxMetadata, IEnumerable<T>, byte[])
constructor.
- Removed
- Reorganized
ITransaction
interface in general. [#1164, #2986]ITransaction
now inheritsIUnsignedTx
interface instead of having properties such asGenesisHash
,UpdatedAddresses
,Timestamp
,Nonce
,Signer
, andPublicKey
.SystemAction
property is replaced byActions
property which is inherited fromIUnsignedTx
interface.CustomActions
property is replaced byActions
property which is inherited fromIUnsignedTx
interface.
Transaction<T>
no more accept emptySignature
as a valid state. Instead, you should useUnsignedTx
class to represent an unsigned transaction. [#1164, #2986]- Removed
Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[])
constructor. - Removed
Transaction<T>.CreateUnsigned()
static method. - Removed
Transaction<T>.Validate()
method. - Removed
sign
parameter fromTransaction<T>.Serialize()
method. - Removed
validate
parameter fromTransaction<T>.Deserialize()
method.
- Removed
Transaction<T>
now hasActions
in a uniform way regardless they are custom actions or system actions, throughTxActionList
abstract class. [#1164, #2986]- Changed the type of
Transaction<T>.Actions
property fromIImmutableList<IAction>
toTxActionList
, which is also anIReadOnlyList<IAction>
. The property once was deprecated in favour ofTransaction<T>.CustomActions
andTransaction<T>.SystemAction
, but now it replaces them both. - Removed
Transaction<T>.CustomActions
property. - Removed
Transaction<T>.SystemAction
property.
- Changed the type of
Transaction<T>(Bencodex.Types.Dictionary)
constructor is removed. UseTxMarshaler.UnmarshalTransaction<T>()
method instead. [#2986]- Removed
PreEvaluationBlock<T>.Evaluate(PrivateKey, IAction?, Predicate<Currency>, IStateStore)
,PreEvaluationBlock<T>.DetermineStateRootHash(IAction?, Predicate<Currency>, IStateStore)
,PreEvaluationBlock<T>.DetermineStateRootHash(IAction?, Predicate<Currency>, IStateStore, out IImmutableDictionary<string, IValue>)
,PreEvaluationBlock<T>.DetermineStateRootHash(BlockChain<T>)
, andPreEvaluationBlock<T>.DetermineStateRootHash(BlockChain<T>, out IImmutableDictionary<string, IValue>)
,BlockChain<T>.ExecuteActions(Block<T>)
. [#3037] - (Libplanet.Extensions.Cocona) Changed signature of
ApvCommand.Verify(string?, string[]?, bool)
method toApvCommand.Verify(string?, PublicKey[]?, bool)
. [#3044] - Removed
PreEvaluationBlock<T>.Mine()
andBlockMetadata.MineNonce()
methods. [#3067] - Removed
HashCash
class. [#3067] - (@planetarium/account) Replaced
Account.publicKey
property withAccount.getPublicKey()
async method. [#3061] - (@planetarium/account) Added
Account.getAddress()
async method. [#3084] - (@planetarium/account)
Address.deriveFrom()
method now returnsPromise<Address>
when anAccount
is given. However, it still returnsAddress
when aPublicKey
is given. [#3061] - (@planetarium/account-web3-secret-storage)
Web3KeyStore
no more implementsImportableKeyStore<KeyId, RawPrivateKey>
. Instead, it now implementsImportableKeyStore<KeyId, Web3Account, Web3KeyMetadata>
. [#3061, #3084] - (Libplanet.Explorer) Added
Index
field toIBlockChainContext
interface. [#2613] - Removed
BlockChain<T>.ProposeBlock(PrivateKey, DateTimeOffset, long, int, int, IComparer<Transaction<T>>, BlockCommit)
method. [#3072] - Changed
BlockChain<T>.ProposeBlock(PrivateKey, DateTimeOffset, BlockCommit, IComparer<Transaction<T>>)
method toBlockChain<T>.ProposeBlock(PrivateKey, BlockCommit, IComparer<Transaction<T>>)
. [#3077] - Changed
BlockChain<T>.ProposeGenesisBlock(IEnumerable<T>, IEnumerable<IAction>, PrivateKey, DateTimeOffset?, IAction, Predicate<Currency>)
toBlockChain<T>.ProposeGenesisBlock( PrivateKey, ImmutableList<Transaction<T>>, DateTimeOffset?, IAction, Predicate<Currency>)
. [#3079] - (Libplanet.Explorer)
Currency.decimalPlaces
' type becameByte
fromUInt
. [#3085] - (Libplanet.Explorer)
currencyHash
parameter was removed frombalance
andtotalSupply
inStateQuery
type. [#3085]
Added APIs
- Added
ITxInvoice
interface. [#1164, #2986] - Added
ITxSigningMetadata
interface. [#1164, #2986] - Added
IUnsignedTx
interface. [#1164, #2986] - Added
TxInvoice
class. [#1164, #2986] - Added
TxSigningMetadata
class. [#1164, #2986] - Added
UnsignedTx
class. [#1164, #2986] - Added
Transaction<T>(IUnsignedTx, ImmutableArray<byte>)
. [#1164, #2986] - Added
BlockChain<T>.DetermineGenesisStateRootHash()
,BlockChain<T>.EvaluateGenesis()
,BlockChain<T>.DetermineBlockStateRootHash()
, andBlockChain<T>.EvaluateBlock()
. [#3037] - Added
PublicKey.FromHex()
static method. [#2709, #3044] - Added
PublicKey.ToHex()
method. [#2709, #3044] - (Libplanet.Net) Added
Gossip.PublishMessage()
method. [#3054, #3060] - (@planetarium/account) Added
Account.getPublicKey()
async method. [#3061] - (@planetarium/account) Added
Account.getAddress()
async method. [#3084] - (@planetarium/account) Added
RawPrivateKey.getPublicKey()
async method. [#3061] - (@planetarium/account) Added
RawPrivateKey.getAddress()
async method. [#3084] - (@planetarium/account-aws-kms) Added
AwsKmsAccount.getPublicKey()
async method. [#3061] - (@planetarium/account-aws-kms) Added
AwsKmsAccount.getAddress()
async method. [#3084] - (@planetarium/account-web3-secret-storage) Added
Web3Account
class. [#3061, #3084] - (@planetarium/account-web3-secret-storage) Added
Web3KeyObject
interface. [#3061] - (Libplanet.Explorer) Added several interfaces and classes that pertain to
blockchain indexing. [#2613]
- Added
IBlockChainIndex
interface. - Added
IIndexingContext
interface. - Added
BlockChainIndexBase
abstract class. - Added
RocksDbBlockChainIndex
class. - Added
RocksDbIndexingContext
class. - Added
IndexingService
class. - Added
IndexMismatchException
class.
- Added
- (Libplanet.Explorer.Cocona) New project was added to provide Cocona
commands related to Libplanet.Explorer project. [#2613]
- Added
IndexCommand
Cocona command class.
- Added
- (Libplanet.Explorer) Added
states
query inStateQuery
. [#3080] - (@planetarium/account) Added
Address.equals()
method. [#3071] - (@planetarium/account) Added
Address.isAddressOf()
method. [#3071] - (@planetarium/account) Added
PublicKey.equals()
method. [#3071] - (@planetarium/account-web3-secret-storage) Added
DecryptionOptions
interface. [#3071]- Added
Web3KeyStoreOptions.decryptionOptions
attribute.
- Added
- (@planetarium/account-web3-secret-storage) Added
WeakPrivateKeyError
class. [#3071] - (@planetarium/account-web3-secret-storage) Added
Web3KeyMetadata
interface. [#3084] - (Libplanet.Tools) Added
-v
/--validator-key
option toplanet block generate-genesis
command. [#3088] - (Libplanet.Explorer) Added
CurrencyInput
type. [#3085] - (Libplanet.Explorer) Added
CurrencyInput
-typedcurrency
parameter tobalance
andtotalSupply
inStateQuery
type. [#3085]
Behavioral changes
Added
TypeConverter
to commonly-used types. [#2711, #3044]Address
now can be converted from and tostring
throughTypeConverter
.HashDigest<T>
now can be converted from and tostring
throughTypeConverter
.PublicKey
now can be converted from and tostring
throughTypeConverter
.
Transaction<T>
no more supports deserialization from JSON when it contains custom actions. However, it still can be deserialized from JSON when it contains a system action. [#2986]Transaction<T>.UpdatedAddresses
now preserves the order ofAddress
es so that it is no more reordered during deserialization. [#3074]The JSON representation of
Transaction<T>
now includes the"actions"
field, which includes a system action or a list of custom actions and a"type"
field denoting one of"system"
or"custom"
.For example:
{ // ... other fields "actions": { "type": "system", "systemAction": { // system action details } } }
Instead of:
{ // ... other fields "systemAction": { // system action details } }
(@planetarium/account-web3-secret-storage)
Web3KeyStore.get()
method now defersPassphraseEntry.authenticate()
call and account unlocking so thatAccountRetrieval
instance can be gathered without unlocking the account. Instead,PassphraseEntry.authenticate()
is called when operations that require unlockingWeb3Account
are called, such assign()
orgetPublicKey()
. [#3061](Libplanet.Explorer) Now, when an
IBlockChainIndex
instance is available in the optionalIndex
property of the injectedIBlockChainContext
instance, GraphQL queries can benefit from the improved lookup performance of the index. Applications willing to take advantage of the index should provide an instance ofIBlockChainIndex
to theIBlockChainContext
implementation and add theIndexingService
hosted service to sync the index in the background. Note that the synchronization may take a long time if you have a lot of blocks (over 24 hours for ~5M blocks). [#2613]BlockRef
property ofTransactionType
now usesIBlockChainIndex
if available.transactionResult
query inTransactionQuery
now usesIBlockChainIndex
if available.
(@planetarium/account-web3-secret-storage)
Web3KeyStore
now supports Scrypt as one of KDF functions besides PBKDF2. [#3071]
Bug fixes
- In
PreVote
block validation,Context<T>.IsValid()
, validate the block header and also the block content (e.g., Tx nonces, Policy defined validation rules, or state root hash.) [#2973, #2996] - (@planetarium/account-web3-secret-storage) Fixed a bug where
Web3KeyStore.import()
andWeb3KeyStore.generate()
methods had written JSON field"Crypto"
instead of"crypto"
in the key file. [#3071]
Dependencies
- *@planetarium/account-aws-kms* now has *@planetarium/account* as a peer dependency instead of a normal dependency. [#3069]
- *@planetarium/account-web3-secret-storage* now has *@planetarium/account* as a peer dependency instead of a normal dependency. [#3069]
- *@planetarium/tx* now has *@planetarium/account* as a peer dependency instead of a normal dependency. [#3069]
CLI tools
- (Libplanet.Explorer.Executable) Project is now deprecated. It is currently nonfunctional. [#2243, #2588]
- (Libplanet.Tools) Now
planet
uses libsecp256k1 (which is the same library used in Bitcoin and written in C) instead of BouncyCastle.Cryptography (which is written in C#). [#3074]
Version 0.53.4
Released on April 4, 2023.
- Fixed version resolution of typescript libraries for dependencies located in the monorepo. [#3050, #3052]
- Exported the omitted
signTx()
andencodeSignedTx()
functions in *@planetarium/tx*. [#3052]
Version 0.53.3
Released on April 3, 2023.
- Adjusted level of the consensus related logs. [#3046]
Version 0.53.2
Released on March 31, 2023.
- Ported changes from Libplanet 0.50.7 release. [#3022]
BlockChain<T>.Create()
is now getIBlockChainState
andActionEvaluator
as parameters. [#3029]
Version 0.53.1
Released on March 28, 2023.
- Ported changes from Libplanet 0.50.6 release. [#3010]
- Introduced a new
Initialize
system action. [#3010
Version 0.53.0
Released on March 27, 2023.
Since 0.53.0, we officially provide @planetarium/account-web3-secret-storage
and @planetarium/account-aws-kms, which are npm packages that provides
KeyStore
implementations that comply with @planetarium/account.
*@planetarium/account-web3-secret-storage*: An npm package for providing
Web3KeyStore
which implements Ethereum Web3 Secret Storage (corresponds toLibplanet.KeyStore.Web3KeyStore
).*@planetarium/account-aws-kms*: An npm package for providing
AwsKmsKeyStore
which implementsAccount
and uses AWS KMS as the backend.
Since 0.53.0, we do not provide Libplanet.Node package anymore. If you still need the package, use 0.52.0 or its patched versions.
Due to changes in [#2961] and [#2970], a network ran with Libplanet 0.51.0 or Libplanet 0.52.0 is not compatible with this version. Thus, it is recommended to skip Libplanet 0.51.0 and Libplanet 0.52.0 for deployment if possible.
Backward-incompatible API changes
- (Libplanet.Node) Removed
Libplanet.Node
namespace. [#2971] - Removed state completion feature with related classes as below. [#2703]
StateCompleter
StateCompleters
TotalSupplyStateCompleter
TotalSupplyStateCompleters
ValidatorSetStateCompleter
ValidatorSetStateCompleters
- Removed type parameter
T
forIAction
fromActionEvaluator
andIBlockChainStates
. [#2703] - (@planetarium/tx) It now depends on @planetarium/bencodex instead of
disjukr/bencodex, so
Encodable
is replaced byValue
.- The return type of
encodeBlockHash()
becameValue
(wasEncodable
). - The return type of
encodePublicKey()
becameValue
(wasEncodable
). - The return type of
encodeAddress()
becameKey
(wasEncodable
). - The return type of
encodeAddressSet()
becameValue
(wasEncodable
). - The return type of
encodeSignedTx()
becameDictionary
(wasMap<string | Buffer, Encodable>
). - The return type of
encodeUnsignedTxWithSystemAction()
becameValue
(wasEncodable
). - The return type of
encodeUnsignedTxWithCustomActions()
becameValue
(wasEncodable
). - The
CustomAction
type is now an alias ofValue
(was an alias ofEncodable
). - The return type of
encodeTxMetadata()
becameDictionary
(wasMap<string | Buffer, Encodable>
). - The return type of
encodeSystemAction()
becameValue
(wasEncodable
). - The return type of
encodeCurrency()
becameValue
(wasEncodable
). - The return type of
encodeMint()
becameValue
(wasEncodable
). - The return type of
encodeTransfer()
becameValue
(wasEncodable
).
- The return type of
- (Libplanet.Net) Changed
Validator
andValidatorSet
to implementIBencodable
. [#2954]- Changed
Validator(Dictionary)
toValidator(IValue)
andValidatorSet(List)
toValidator(IValue)
. - Changed
Validator.Encoded
toValidator.Bencoded
andValidatorSet.Encoded
toValidatorSet.Bencoded
.
- Changed
- Changed
BlockCommit
to implementIBencodable
. [#2955]- Changed
BlockCommit(Dictionary)
toBlockCommit(IValue)
. - Changed
BlockCommit.Encoded
toBlockCommit.Bencoded
.
- Changed
- Changed
BlockHash
to implementIBencodable
. [#2959]- Changed
BlockHash(Binary)
toBlockHash(IValue)
. - Added
BlockHash.Bencoded
property.
- Changed
- Removed
ITxMetadata
interface. [#2977]- The signature of
Transaction<T>(ITxMetadata, IAction, byte[])
constructor becameTransaction<T>(TxMetadata, IAction, byte[])
. - The signature of
Transaction<T>(ITxMetadata, IEnumerable<T>, byte[])
constructor becameTransaction<T>(TxMetadata, IEnumerable<T>, byte[])
. - The signature of
TxMetadata(ITxMetadata)
constructor becameTxMetadata(ITransaction)
.
- The signature of
- Removed
ITxExcerpt
interface. [#1997, #2977] - Removed
TxExcerptExtensions
static class. [#1997, #2977] - (Libplanet.Net) Changed
VoteMetadata
andVote
to implementIBencodable
. [#2961]- Changed
VoteMetadata(Dictionary)
toVoteMetadata(IValue)
andVote(Dictionary)
toVote(IValue)
. - Changed
VoteMetadata.Encoded
toVoteMetadata.Bencoded
andVote.Encoded
toVote.Bencoded
.
- Changed
- Removed
byte
array related APIs fromBlockCommit
,Vote
,VoteMetadata
. [#2970]- Removed
BlockCommit(byte[])
,BlockCommit.ByteArray
, andBlockCommit.ToByteArray()
. - Removed
Vote(byte[])
,Vote.ByteArray
, andVote.ToByteArray()
. - Removed
VoteMetadata(byte[])
,VoteMetadata.ByteArray
, andVoteMetadata.ToByteArray()
.
- Removed
ActionEvaluator()
constructor now explicitly requires a newfeeCalculator
parameter. [#2566]
Backward-incompatible storage format changes
- (Libplanet.Net) Changed
BlockCommit
'sIValue
encoding format. [#2961] - Changed
Block<T>
'sIValue
encoding format. [#2970]
Added APIs
- Added
TransactionExtensions
static class. [#2977] - (@planetarium/account) Added key store abstractions. [#2915]
- Added
AccountDeletion
type. - Added
AccountGeneration
type. - Added
AccountImportation
type. - Added
AccountMetadata
type. - Added
AccountRetrieval
type. - Added
ImportableKeyStore
interface. - Added
KeyStore
interface. - Added
MutableKeyStore
interface.
- Added
- Added
IFeeCalculator
interface. [#2566]
Behavioral changes
- (@planetarium/account)
Signature.fromBytes()
andSignature.fromHex()
no more accept signatures with high S. Signatures with high S need to be normalized first so that they get rid of high S. [#2962]
Dependencies
- Added @planetarium/account-web3-secret-storage npm package. [#2915]
- Added @planetarium/account-aws-kms npm package. [#2962]
- Removed Libplanet.Node package. Libplanet.Node 0.52.0 was its last minor release. [#2971]
Version 0.52.2
Released on March 28, 2023.
- Ported changes from Libplanet 0.50.6 release. [#2976]
- Introduced a new
Initialize
system action. [#2976]
Version 0.52.1
Released on March 15, 2023.
- Ported changes from Libplanet 0.51.2 release. [#2946]
Version 0.52.0
Released on March 3, 2022.
Due to changes in [#2894], under certain circumstances, a network ran with Libplanet 0.51.0 may have difficulty getting up and running after an update to this version. Thus, it is recommended to skip Libplanet 0.51.0 for deployment if possible.
Backward-incompatible API changes
BlockChain<T>()
no longer accepts anIStore
whereIStore.GetCanonicalChainId()
isnull
. For on-the-flyBlockChain<T>
creation from scratch, useBlockChain<T>.Create()
factory method instead. [#2863]BlockChain<T>.Append()
no longer accepts a genesisBlock<T>
(i.e. anyBlock<T>
with an index of0
). [#2863]BlockChain<T>()
now throws anArgumentException
if providedIStore
does not have its canonical chain id set or provided chain id is not found. [#1486, #2585, #2889]- Added
IStore.GetChainBlockCommit()
andIStore.PutChainBlockCommit()
interface methods. [#2878, #2894]
Added APIs
- Added
BlockChain<T>.Create()
factory method for creating aBlockChain<T>
with an emptyIStore
. [#2863]
Behavioral changes
- Changed
BlockChain<T>.Fork()
to copyBlockCommit
for its newly forkedBlockChain<T>.Tip
. [#2878, #2894]
Version 0.51.4
Released on March 28, 2023.
- Ported changes from Libplanet 0.50.6 release. [#2975]
- Introduced a new
Initialize
system action. [#2975]
Version 0.51.3
Released on March 17, 2023.
Bug fixes
- Ported changes from Libplanet 0.50.5 release. [#2956]
Version 0.51.2
Released on March 15, 2023.
- Ported changes from Libplanet 0.50.3 release. [#2937]
- Fixed
BlockCommit.Encoded
to be more compact. [#2938] - Fixed
Vote.Encoded
andProposal.Encoded
to be more compact. [#2943]
Version 0.51.1
Released on March 13, 2023.
Bug fixes
- (Libplanet.Net) Fixed a bug where
ActionExecutionState
hadn't generated correctly because of wrongTotalBlockCount
. [#2917]
Version 0.51.0
Released on March 7, 2023.
Since 0.51.0, we officially provide @planetarium/account, an npm package for providing measures to represent accounts for apps developed with Libplanet in JavaScript/TypeScript. Note that the feature set is being actively developed, and the specification might change in the near future.
Deprecated APIs
- Removed
TotalDifficultyComparer
class. [#2872] - Removed
IBlockPolicy<T>.GetNextBlockDifficulty()
interface method and all its implementations. [#2872] - Removed
IBlockPolicy.TotalDifficulty
interface property and its implementations. [#2872] - Removed all total difficulty related parameters. [#2872]
- Removed
IBlockPolicy.Difficulty
interface property and its implementations. [#2872] - Removed
IPreEvaluationBlockHeader.Nonce
interface property and its implementations. [#2872] - Removed
InvalidBlockTotalDifficultyException
class. [#2872] - Removed
InvalidBlockDifficultyException
class. [#2872] - Removed
BlockChain<T>.MakeGenesisBlock()
andBlockChain<T>.MineBlock()
methods. [#2872] - Removed
HashAlgorithmType
class. [#2872] - Removed
PreEvaluationBlock<T>(IBlockContent<T>)
constructor. [#2872] - Removed
IBlockPolicy.GetMinBlockProtocolVersion()
interface method. [#2872]
Backward-incompatible API changes
- Added
LastCommit
property toIBlockMetadata
. [#2872] - Bumped
BlockMetadata.CurrentProtocolVersion
to 4. [#2872] - Changed
IPreEvaluationBlockHeader.PreEvaluationHash
type fromImmutableArray<byte>
toHashDigest<SHA256>
. [#2872] - Added
IStore.GetBlockCommit(BlockHash)
method. [#2872] - Added
IStore.PutBlockCommit(BlockCommit)
method. [#2872] - Added
IStore.DeleteBlockCommit(BlockHash)
method. [#2872] - Added
IStore.GetBlockCommitHashes()
method. [#2872] BlockMetadata.MakeCandidateData()
now uses a SHA256 hash ofLastCommit
for creating a candidate data forPreEvaluationBlockHeader<T>
. Due to this change,PreEvaluationHash
results different with previous block hash computation if theBlockMetadata.LastCommit
is not null. [#2872]- (Libplanet.Net) Removed
SwarmOptions.StaticPeers
. [#2872] - Changed
BlockPolicy<T>()
constructor not to takeFunc<long, int>
type parameter namedgetMinBlockProtocolVersion
. [#2872]
Backward-incompatible network protocol changes
- (Libplanet.Net) Values for
Message.MessageType
are updated to use entirely different values. [#2872]
Added APIs
- Added
VoteFlag
enum. [#2872] - Added
IVoteMetadata
interface. [#2872] - Added
VoteMetadata
class. [#2872] - Added
Vote
class. [#2872] - Added
BlockContent.Propose()
method. [#2872] - Added
BlockCommit
class. [#2872] - Added
BlockChain.ProposeGenesisBlock()
static method. [#2872] - Added
BlockChain.ProposeBlock()
method. [#2872] - Added
BlockCommitExtensions
class. [#2872] - Added
ContextTimeoutOption
class. [#2872] - Added
BlockMarshaler.UnmarshalBlockHash()
method. [#2872] - Added
BlockChain<T>.GetBlockCommit()
method. [#2872] - Added
InvalidBlockCommitException
class. [#2872] - Added
BlockChain<T>.ValidateBlockCommit()
method. [#2872] - (Libplanet.Net) Added
IReactor
interface. [#2872] - (Libplanet.Net) Added
ConsensusReactor
class which inheritsIReactor
interface. [#2872] - (Libplanet.Net) Added
ConsensusContext
class. [#2872] - (Libplanet.Net) Added
Context
class. [#2872] - (Libplanet.Net) Added
Step
enum. [#2872] - (Libplanet.Net) Added
ConsensusMessage
abstract class which inheritsMessage
abstract class. And added classes which implementsConsensusMessage
abstract class. [#2872]- Added
ConsensusProposal
class. - Added
ConsensusVote
class. - Added
ConsensusCommit
class.
- Added
- (Libplanet.Net) Added enumeration items to
MessageType
enum. [#2872]- Added
ConsensusProposal
of value0x40
. - Added
ConsensusVote
of value0x41
. - Added
ConsensusCommit
of value0x42
.
- Added
- (Libplanet.Net) Added
ConsensusReactorOption
struct. [#2872] - (Libplanet.Net) Added
InvalidConsensusMessageException
class. [#2872] - (Libplanet.Net) Added
InvalidHeightIncreasingException
class. [#2872] - (Libplanet.Net) Added
Message.Id
property. [#2872] - (Libplanet.Net) Added
Gossip
class. [#2872] - (Libplanet.Net) Added
Proposal
class. [#2872] - (Libplanet.Net) Added
ProposalMetadata
class. [#2872] - (Libplanet.Net) Added
NetMQMessageCodec.ParseMessageType()
. [#2872] - (Libplanet.Explorer) Added
BoundPeerType
class. [#2872] - (Libplanet.Explorer) Added
BlockCommitType
class. [#2872] - (Libplanet.Explorer) Added
VoteFlagType
class. [#2872] - (Libplanet.Explorer) Added
VoteType
class. [#2872] - (Libplanet.Explorer) Added
BlockCommitType
as a return ofBlockQuery
. [#2872] - Added
PolymorphicAction<T>.ActionTypeLoader
static property to provide a way to configure action type loader to be used inPolymorphicAction<T>
. [#2873] - (@planetarium/tx) Added
SignedTx
type. [#2882] - (@planetarium/tx) Added
signTx
function. [#2882] - (@planetarium/tx) Added
encodeSignedTx
function. [#2882]
Behavioral changes
PreEvaluationBlockHeader()
constructor became to throwInvalidBlockLastCommitException
when its metadata'sLastCommit
is invalid. [#2872]BlockChain<T>.Append()
has new parameterBlockCommit blockCommit
, which is a set of commits for given block.BlockCommit
is used for checks whether a block is committed in consensus. [#2872]BlockChain<T>.Append()
method became to throwInvalidBlockCommitException
when the givenBlockCommit
is invalid with given block. [#2872]
Bug fixes
- (Libplanet.Explorer) Fixed a bug where
stateQuery
hadn't work correctly in some situations. [#2872]
Dependencies
- Added @planetarium/account npm package. [#2848]
Version 0.50.7
Released on March 29, 2023.
- Optimized internal byte array to hex string conversion in several places. [#2989, #3007]
IValidatorSupportStateDelta
is now public [#3017]- Optimized
BlockChainState.GetStates()
by caching results. [#3018]
Version 0.50.6
Released on March 22, 2023.
Version 0.50.5
Released on March 17, 2023.
Bug fixes
- (Libplanet.Net) Fixed a bug where
DealerSocket
cannot connect to peers because of IPv4 return ofResolveNetMQAddressAsync()
. [#2956]
Version 0.50.4
Released on March 16, 2023.
- Fixed
Validator.Encoded
to use a proper typeBencodex.Types.Integer
forValidator.Power
instead ofBencodex.Types.Binary
. [#2949]
Version 0.50.3
Released on March 14, 2023.
- Ported changes from Libplanet 0.49.3 release. [#2935]
Version 0.50.2
Released on March 9, 2023.
- Added
PolymorphicAction<T>.ActionTypeLoader
static property to provide a way to configure action type loader to be used inPolymorphicAction<T>
. [#2875]
Version 0.50.1
Released on March 6, 2023.
- Ported changes from Libplanet 0.49.1 and Libplanet 0.49.2 release. [#2884]
Version 0.50.0
Released on February 27, 2023.
Backward-incompatible API changes
- Added
Message.Content
property. [#2772, #2831] - Some properties and enum of
Message
class are removed and moved toMessageContent
class. [#2772, #2831]- Removed
Message.Type
property. - Removed
Message.DateField
property. - Removed
Message.MessageType
enum.
- Removed
ITransport
interface and its implementations overhauled. [#2772, #2831]ITransport.SendMessageAsync(BoundPeer, Message, TimeSpan?, CancellationToken)
method has changed toITransport.SendMessageAsync(BoundPeer, MessageContent, TimeSpan?, int, bool, CancellationToken)
.ITransport.SendMessageAsync(BoundPeer, Message, TimeSpan?, CancellationToken)
method has changed toITransport.SendMessageAsync(BoundPeer, MessageContent, TimeSpan?, int, bool, CancellationToken)
.ITransport.BroadcastMessage(IEnumerable<BoundPeer>, Message)
method has changed toITransport.BroadcastMessage(IEnumerable<BoundPeer>, MessageContent)
.ITransport.ReplyMessageAsync(Message, CancellationToken)
method has changed toITransport.ReplyMessageAsync(MessageContent, byte[], CancellationToken)
.
- Removed
InvalidMessageException
class. Instead, addedInvalidMessageContentException
class. [#2772, #2831]
Added APIs
- Added
MessageContent
class. [#2772, #2831]- All messages (e.g.
PingMsg
) became to inheritMessageContent
(wereMessage
).
- All messages (e.g.
Behavioral changes
IBlockPolicy
is no longer enforced for genesisBlock<T>
s. [#2845]
Version 0.49.3
Released on March 14, 2023.
- Ported changes from Libplanet 0.48.1 release. [#2933]
Version 0.49.2
Released on March 3, 2023.
- General logging changes for better comprehension. [#2874]
Version 0.49.1
Released on February 24, 2023.
- (Libplanet.Net) Reduced logging due output being too verbose. [#2849]
Version 0.49.0
Released on February 20, 2023.
Backward-incompatible API changes
- (Libplanet.Net) Changed
BlockCandidateTable<T>.Add(BlockHeader, IEnumerable<Block<T>>)
toBlockCandidateTable<T>.Add(BlockHeader, Branch<T>)
. [#2822] - (Libplanet.Net) Changed the return type of
BlockCandidateTable<T>.GetCurrentRoundCandidate()
fromList<Block<T>>?
toBranch<T>?
. [#2822]
Added APIs
- Added
Branch<T>
class to represent a sequence of consecutiveBlock<T>
s. [#2822]
Behavioral changes
Swarm<T>
became not to spawn multiple task for processBlockDemand
for the sameBoundPeer
. [#2808, #2814]
Bug fixes
- Fixed a bug where
NetMQTransport
's overall throughput had been dropped when hostname resolving for some peers was delayed. [#2817]
Version 0.48.1
Released on March 14, 2023.
- Ported changes from Libplanet 0.47.1 release. [#2931]
Version 0.48.0
Released on February 14, 2023.
Backward-incompatible API changes
- Removed
BlockCandidateTable<T>.Any()
method. [#2794] - Changed the return type from
SortedList<long, Block<T>>?
toList<Block<T>>?
forBlockCandidateTable<T>.GetCurrentRoundCandidate()
method. [#2794] - Changed the behavior of
BlockCandidateTable<T>.Add()
method. [#2794] - Changed
TxId
to implementIBencodable
interface. [#2795]
Added APIs
- Added
Serializable
attribute back toAddress
. [#2798] - (Libplanet.Net) Added
Serializable
attribute back toBoundPeer
. [#2798] - (@planetarium/tx) Added
encodeUnsignedTxWithCustomActions()
function. [#2805] - (@planetarium/tx) Added
CustomAction
type. [#2805] - (@planetarium/tx) Added
UnsignedTxWithCustomActions
type. [#2805]
Behavioral changes
- (Libplanet.Net) Changed
Swarm<T>
to respond to aGetBlocksMsg
request with an emptyBlocksMsg
if no requestedBlock<T>
s are found. [#2800, #2803]
Dependencies
- (@planetarium/tx) Because
globalThis.crypto
API is available since Node.js version 19.0.0, it now explicitly requires 19.0.0 or later. [#2805]
Version 0.47.1
Released on March 14, 2023.
- Ported changes from Libplanet 0.46.2 and Libplanet 0.46.3. [#2929]
Version 0.47.0
Released on February 6, 2023.
Backward-incompatible API changes
- The signature of
Address(ImmutableArray<byte>)
constructor becameAddress(in ImmutableArray<byte>)
. [#2756] - The signature of
BlockHash(ImmutableArray<byte>)
constructor becameBlockHash(in ImmutableArray<byte>)
. [#2756] - The signature of
Nonce(ImmutableArray<byte>)
constructor becameNonce(in ImmutableArray<byte>)
. [#2756] - Removed
IAccountStateView.GetValidatorSet()
method. [#2733] - Removed
IAccountStateDelta.SetValidator(Validator)
method. [#2733] - (Libplanet.Extensions.Cocona) Dropped .NET Standard 2.0 and .NET Core 3.1 target assemblies. [#2732]
- (Libplanet.Extensions.Cocona) Added .NET 6 target assembly. [#2732]
- (Libplanet.Net) Added
ITransport.AppProtocolVersion
,ITransport.TrustedAppProtocolVersionSigners
, andITransport.DifferentAppProtocolVersionEncountered
properties. [#2743] - (Libplanet.Net) Changed
Swarm<T>(BlockChain<T>, PrivateKey, AppProtocolVersionOptions, HostOptions, SwarmOptions)
toSwarm<T>(BlockChain<T>, PrivateKey, ITransport, SwarmOptions)
. [#2743] - (Libplanet.Net) Changed the type for
AppProtocolVersionOptions.TrustedAppProtocolVersionSigners
fromIImmutableHashSet<PublicKey>?
toIImmutableHashSet<PublicKey>
. [#2759] - (Libplanet.Net) Changed
BoundPeer
to implementIBencodable
interface and removed[Serializable]
attribute fromBoundPeer
. [#2778] - (Libplanet.Net) Changed
BoundPeer(Dictionary)
constructor's signature toBoundPeer(IValue)
. [#2778] - Changed
Address
to implementIBencodable
interface and removed[Serializable]
attribute fromAddress
. [#2778] - Changed
Address(Binary)
constructor's signature toAddress(IValue)
. [#2778]
Added APIs
- Introduced Libplanet.Crypto.Secp256k1 package. [#2780]
- Many more types became serialized and deserialized better with
System.Text.Json.JsonSerializer
as they now have their own custom converters. Note that these serializations are unavailable on Unity due to its incomplete reflection support. [#2756]- A
Nonce
became represented as a single hexadecimal string in JSON. - A
PublicKey
became represented as a single hexadecimal string in JSON. - A
Block<T>
became represented as an object with values in JSON.
- A
- Added
TxId(in ImmutableArray<byte>)
constructor. [#2756] - Added
ByteUtil.ParseHexToImmutable()
static method. [#2756]
Bug fixes
- Fixed a JSON serializer bug where a
Transaction<T>
serialized into JSON had lacked the content of itsPublicKey
. [#2756] - (Libplanet.Explorer) Fixed a bug where the query
stateQuery
hadn't work correctly. [#2757] - Fixed a bug of
DefaultStore.PutTxExecution()
where sometimesTxExecution
data is in undefined state due to data corruption. [#2761] - (Libplanet.Node) Fixed a bug of
NodeUtils<T>.CreateGenesisBlock()
where sometimes block data is in undefined state due to data corruption. [#2761] - Fixed where
Address(string)
could accept 42 chars with a wrong prefix. [#2781] - Fixed where
VolatileStagePolicy<T>(TimeSpan)
created withTimeSpan.MaxValue
as its argument would not behave properly and throw anArgumentOutOfRangeException
. [#2783, #2784]
Dependencies
- Upgrade Bencodex from 0.7.0-dev.20220923062845 to 0.8.0. [#2294]
- Upgrade Bencodex.Json from 0.7.0-dev.20220923062845 to 0.8.0. [#2294]
- Upgrade System.Text.Json from 6.0.6 to 6.0.7. [#2322]
CLI tools
- Added
planet block
subcommand group. [#2758]- Added
planet block analyze
subcommand. - Added
planet block generate-genesis
subcommand.
- Added
- Fixed a bug of
planet tx analyze
subcommand where a serialized transaction had lacked the content of its"publicKey"
. [#2756]
Version 0.46.3
Released on March 14, 2023.
- Fixed
Validator.Encoded
to be more compact. [#2927]
Version 0.46.2
Released on February 16th, 2023.
- Fix memory issues when preloading. [#2804]
Version 0.46.1
Released on February 3, 2023.
- Ported changes from Libplanet 0.45.5 release.
- General changes to log output for readability. [#2769]
Version 0.46.0
Released on January 18th, 2023.
Backward-incompatible API changes
- Changed
BlockLocator
to throw anArgumentException
if an empty set ofBlockHash
es are given during construction. [#2584] BlockChain<T>()
now explicitly requires bothstore
andstateStore
arguments to be notnull
. [#2609]BlockChain<T>.Swap()
now throws anInvalidOperationException
if called on a non-canonical chain. [#2619]- Added
actionsLogsList
parameter toTxSuccess
constructor. [#2474, #2505] - Added
actionsLogsList
parameter toTxFailure
constructor. [#2474, #2505] - Removed
BlockLocator(Func<long, BlockHash?>, Func<BlockHash, long>, int)
constructor. UseBlockLocator.Create()
static method instead. [#2580, #2584] - Replaced
IAction?
-typedpolicyBlockAction
parameter withPolicyBlockActionGetter
-typedpolicyBlockActionGetter
parameter inActionEvaluator
constructor. [#2646] - Removed
IStore.GetCanonicalGenesisBlock<T>()
interface method and all its implementations. [#2664] - Replaced
IPreEvaluationBlockHeader
-typedblockHeader
parameter withIActionTypeLoaderContext
-typedcontext
parameter in the below methods. [#2653]IActionTypeLoader.Load()
.IActionTypeLoader.LoadAllActionTypes()
.
- Added
IAccountStateDelta.SetValidator(Validator)
method. [#2716] - Added
IAccountStateView.GetValidatorSet()
method. [#2716] - Added
IBlockChainStates.GetValidatorSet(BlockHash, ValidatorSetStateCompleter<T>)
method. [#2716]- Added
BlockChain.GetValidatorSet(BlockHash, ValidatorSetStateCompleter<T>)
method. - Added
BlockChainStates.GetValidatorSet(BlockHash, ValidatorSetStateCompleter<T>)
method.
- Added
- Added
StateCompleterSet.ValidatorSetStateCompleter
property. [#2716] - (Libplanet.Net) Removed
workers
parameter fromNetMQTransport.Create()
method andSwarm<T>()
constructor. [#2690] - (Libplanet.Net) Changed
Swarm<T>()
andNetMQTransport.Create()
to takeAppProtocolVersionOptions
as a combined parameter instead of takingAppProtocolVersion
,IImmutableSet<PublicKey>?
, andDifferentAppProtocolVersionEncountered
separately. [#2693] - (Libplanet.Net) Changed
Swarm<T>()
andNetMQTransport.Create()
to takeHostOptions
as a combined parameter instead of takingstring?
,IEnumerable<IceServer>?
, andint?
separately. [#2701]
Added APIs
- Added
TxExecution.ActionsLogsList
property. [#2474, #2505] - Added
ActionEvaluation.Logs
property. [#2474, #2505] - (Libplanet.Explorer) Added
TxResult.ActionsLogsList
property. [#2474, #2505] - (Libplanet.Explorer) Added
actionsLogsList
field toTxResultType
. [#2474, #2505] - Added
BlockLocator.Create()
static method. [#2584] - Added
PolicyBlockActionGetter
delegator type. [#2646] - Added
IActionTypeLoader.LoadAllActionTypes()
method. [#2646]- Added
StaticActionTypeLoader.LoadAllActionTypes()
method.
- Added
- Added
IActionTypeLoaderContext
interface. [#2653] - Added
AppProtocolVersionOptions
class. [#2693] - Added
HostOptions
class. [#2701] - Added
Validator
class. [#2716] - Added
ValidatorSet
class. [#2716] - Added
SetValidator
class. [#2716] - Added
ValidatorSetGetter
delegate. [#2716] - Added
ValidatorSetStateCompleter<T>
delegate. [#2716] - Added
ValidatorSetStateCompleters<T>
class. [#2716] - (Libplanet.Explorer) Added
ValidatorType
class. [#2716] - (Libplanet.Explorer) Added
validators
query inStateQuery
. [#2716]
Behavioral changes
- Changed
BlockChain<T>.FindNextHashes()
to return at mostcount
number ofBlockHash
es regardless of the result.BlockChain<T>
. [#2581, #2584] - Changed
BlockChain<T>.FindNextHashes()
to return zeroBlockHash
es if no branch pointBlockHash
is found instead of returningBlockHash
es starting with the genesisBlockHash
. [#2582, #2584] - Changed the behavior of
BlockLocator
index selection and sampling when creating an instance. [#2583, #2584] - Changed the default
VolatileStagePolicy<T>.Lifetime
from 3 hours to 10 minutes. [#2718]
Bug fixes
- (Libplanet.Net) Fixed a bug
NetMQTransport
log shows socket count wrongly. [#2708] - (Libplanet.Net) Fixed a bug where
NetMQTransport.SendMessageAsync()
method hadn't disposed of internal sockets properly when connecting failed. [#2719]
CLI tools
- Fixed a bug
planet store
had not recognized RocksDB store (rocksdb+file:
). [#2699] - Added
planet store chain-ids
subcommand. [#2699, #2704] - Added
-P
/--public-key
option toplanet key derive
subcommand. [#2705]
Version 0.45.5
Released on January 19, 2023.
- Fixed a bug when
Web3KeyStore.Get()
hadn't worked properly on IL2CPP environment. [#2727] - Back-ported below changes from Libplanet 0.46.0 release.
- (Libplanet.Net) Fixed a bug
NetMQTransport
log shows socket count wrongly. [#2708] - (Libplanet.Net) Fixed a bug where
NetMQTransport.SendMessageAsync()
method hadn't disposed of internal sockets properly when connecting failed. [#2719] - (Libplanet.Net)
BoundPeer()
constructor became to validate a hostname ofendPoint
parameter. [#2721]
- (Libplanet.Net) Fixed a bug
Version 0.45.4
Released on January 4, 2023.
- Ported changes from [Libplaent 0.44.7] release. [#2684]
Version 0.45.3
Released on December 26, 2022.
- Ported changes from Libplanet 0.44.6 release. [#2667]
Version 0.45.2
Released on December 21, 2022.
- Ported changes from Libplanet 0.44.5 release. [#2654]
Version 0.45.1
Released on December 15, 2022.
- Ported changes from Libplanet 0.44.4 release. [#2631]
- (Libplanet.Net) Fixed a bug where
NetMQTransport.SendMessageAsync()
hadn't been canceled properly. [#2641]
Version 0.45.0
Released on December 3, 2022.
Deprecated APIs
- Removed
BlockChain<T>.MineBlock(PrivateKey, DateTimeOffset, bool, long, int, int, IComparer<Transaction<T>>, CancellationToken?)
by making itinternal
. [#2529] - Removed
IStore.SetBlockPerceivedTime()
andIStore.GetBlockPerceivedTime()
methods. [#2575] - Removed
BlockPerception
struct. [#2575] - Removed
BlockChain<T>.PerceiveBlock()
method. [#2575]
Backward-incompatible API changes
- Changed
BlockChain<T>.MineBlock(PrivateKey, DateTimeOffset?, bool?, long?, int?, int?, IComparer<Transaction<T>>, CancellationToken?)
toBlockChain<T>.MineBlock(PrivateKey, DateTimeOffset?, bool?, IComparer<Transaction<T>>, CancellationToken?)
by removing policy controlled parameters. [#2529] - Changed
BlockPolicy<T>()
constructor to take additionalFunc<long, int>
type parameter namedgetMinBlockProtocolVersion
. [#2593]
Added APIs
- Added
BlockChainStates<T>
class. [#2507] - Added new constructors of
BlockChain<T>
takesIBlockChainStates<T>
andActionEvaluator<T>
directly. [#2507] - Added non-generic interfaces. [#2539]
- Added
IPreEvaluationBlock
interface. - Added
IBlockContent
interface. - Added
ITransaction
interface.
- Added
- Added
IActionTypeLoader
interface. [#2539] - Added
StaticActionTypeLoader
class. [#2539] - (Libplanet.Explorer) Added a new GraphQL endpoint on
/graphql/explorer
. [#2562] - Added
IBlockPolicy.GetMinBlockProtocolVersion()
interface method. [#2593]
Bug fixes
- (Libplanet.Net) Fixed a bug where
AppProtocolVersion.GetHashCode()
did not work as intended. [#2518, #2520]
Dependencies
- Replaced BouncyCastle.NetCore 1.8.6 with BouncyCastle.Cryptography 2.0.0. [#2571]
CLI tools
- Now
planet
can be installed using Homebrew on macOS:brew install planetarium/brew/planet
. [#2555] - Now
planet
supports command-line completion for bash and zsh. See also Cocona's manual on configuring command-line completion. [#2586] - (Libplanet.Explorer) Added
serve
subcommand. [#2563]- (Libplanet.Explorer) Deprecated primary command.
It will be obsoleted in 0.47.0 release.
You should use
serve
command instead. [#2563]
- (Libplanet.Explorer) Deprecated primary command.
It will be obsoleted in 0.47.0 release.
You should use
- (Libplanet.Explorer) Added
schema
subcommand. [#2563]
Version 0.44.7
Released on January 4, 2023.
- (Libplanet.Net) Fixed bugs where
NetMQTransport
hadn't worked expected when not many threads were available. [#2684] - (Libplanet.Net) Fixed a bug where
NetMQTransport.ReplyMessageAsync()
hadn't worked properly. [#2684]
Version 0.44.6
Released on December 26, 2022.
- (Libplanet.Net) Fixed a bug where
NetMQTransport
hadn't worked properly on Windows. [#2667] - Fixed a scope of readlock on
BlockChain<T>.GetBlockLocator()
method for sake of parallelism. [#2667]
Version 0.44.5
Released on December 21, 2022.
- Improved overall performance of
NetMQTransport
andSwarm<T>
classes. [#2654]
Version 0.44.4
Released on December 15, 2022.
- Improved overall performance of
NetMQTransport
andTxCompletion<T>
classes. [#2631]
Version 0.44.3
Released on December 1, 2022.
- Fixed a bug of
TxMetadata.ToBencodex()
method where the encoded timestamp had differed fromTxMetadata.Timestamp
when it has non-zero time zone offset. [#2598]
Version 0.44.2
Released on November 29, 2022.
- Improved performance of
.Iterate()
and.GetNextTxNonce()
ofVolatileStagePolicy
. [#2589]
Version 0.44.1
Released on November 7, 2022.
- (Libplanet.Net) Fixed a bug where
NetMQTransport.SendMessageAsnyc()
had hung forever when given peer information isn't valid. [#2424, #2521]
Version 0.44.0
Released on November 2, 2022.
Backward-incompatible API changes
- Removed all
TxMetadata.ToBencodex()
overload methods with parameters. Use newly introduced parameterlessTxMetadata.ToBencodex()
instead. [#2457] - (Libplanet.Node) Changed
UntypedTransaction(ITxMetadata, IEnumerable<IValue>, ImmutableArray<byte>)
toUntypedTransaction( ITxMetadata, IValue?, IValue?, ImmutableArray<byte>
) to supportTransaction<T>.SystemAction
. [#2456, #2457] - (Libplanet.Node) Renamed
UntypedTransaction.ActionValues
toUntypedTransaction.CustomActionsValue
and changed its type fromIReadOnlyList<IValue>
toIValue?
. [#2456, #2457]
Added APIs
- (Libplanet.Explorer) Added
json
field toActionType
GraphQL type. [#2418] - (Libplanet.Node) Added
IValue? SystemActionValue
property toUntypedTransaction
. [#2456, #2457]
Behavioral changes
Bug fixes
- (Libplanet.Explorer)
Libplanet.Explorer.Executable
became to work again. [#2420]
CLI tools
- Added builds for Apple Silicon to releases. [#2365]
Version 0.43.3
Released on November 7, 2022.
- (Libplanet.Net) Fixed a bug where
NetMQTransport.SendMessageAsnyc()
had hung forever when given peer information isn't valid. [#2424, #2521]
Version 0.43.2
Released on November 1, 2022.
- (Libplanet.RocksDBStore)
RocksDBStore
no more crashes with stack overflow during iterating block indices even if a chain is deeply nested (due to forks). [#2338, #2379]
Version 0.43.1
Released on October 17, 2022.
Added APIs
- (Libplanet.Explorer) Added
TxResultType.UpdatedStateType
andTxResultType.FungibleAssetBalancesType
GraphQL types. [#2405]
Version 0.43.0
Released on October 14, 2022.
Since 0.43.0, we officially provide @planetarium/tx, an npm package for creating unsigned transactions in JavaScript/TypeScript. Although it is still in experimental stage, which can build only unsigned transactions with a system action, its features will be added more in the future.
Backward-incompatible API changes
- Removed
DateTimeOffset?
type parameter that allowed a creation of a genesisBlock<T>
with specific timestamp fromBlockChain<T>.MakeGenesisBlock()
. [#2321] - Overhauled constructors for
BlockMetadata
,BlockContent<T>
,PreEvaluationBlockHeader
,PreEvaluationBlock<T>
,BlockHeader
, andBlock<T>
. [#2321]- All unsafe constructors have been removed in order to prevent instantiation of invalid block related objects.
BlockMetadata
has constructorsBlockMetadata(IBlockMetadata)
andBlockMetadata(long, DateTimeOffset, PublicKey, long, BigInteger, BlockHash?, HashDigest<SHA256>)
.BlockContent
has constructorsBlockContent<T>(IBlockMetadata, IEnumerable<Transaction<T>> transactions)
,BlockContent<T>(BlockMetadata)
andBlockContent<T>(BlockMetadata, IEnumerable<Trnasaction<T>> transactions)
.PreEvaluationBlockHeader
has constructorsPreEvaluationBlockHeader(IPreEvaluationBlockHeader)
andPreEvaluationBlockHeader(BlockMetadata, (Nonce, ImmutableArray<byte>))
.PreEvaluationBlock<T>
has constructorsPreEvaluationBlock<T>(IPreEvaluationBlockHeader, IEnumerable<Transaction<T>>)
andPreEvaluatoinBlock<T>(BlockContent<T>, (Nonce, ImmutableArray<byte>))
.BlockHeader
has constructorsBlockHeader(IBlockHeader)
andBlockHeader(PreEvaluationBlockHeader, (HashDigest<SHA256>, ImmutableArray<byte>?, BlockHash))
.Block<T>
has constructorsBlock<T>(IBlockHeader, IEnumerable<Transaction<T>>)
andBlock<T>(PreEvaluationBlock<T>, (HashDigest<SHA256>, ImmutableArray<byte>, BlockHash))
.
BlockContent<T>
no longer inheritsBlockMetadata
andPreEvaluationBlock<T>
no longer inheritsPreEvaluationBlockHeader
. [#2321]- Both
BlockMetadata
andBlockContent<T>
are made immutable. Their properties can no longer be assigned to. [#2321] - Copy extension methods for
BlockMetadata
andBlockContent<T>
removed. [#2321] - (Libplanet.Extensions.Cocona) The return type of
Utils.DeserializeHumanReadable<T>()
static method becameT?
(wasT
). [#2322]
Added APIs
- System actions now have methods to check equality. [#2294]
Mint
now implementsIEquatable<Mint>
.Mint
now implementsIEquatable<IAction>
.Transfer
now implementsIEquatable<Transfer>
.Transfer
now implementsIEquatable<IAction>
.
- (Libplanet.Net) Added
IRoutingTable
interface. [#2046, #2229] - (Libplanet.Net)
RoutingTable
now implementsIRoutingTable
interface. [#2046, #2229] - Added
ActionEvaluator<T>.GenerateRandomSeed()
static method. [#2131, #2236] - Each
BlockMetadata
,PreEvaluationBlockHeader
, andBlockHeader
can be accessed from any "larger" type object through properties. [#2321]BlockMetadata
can be accessed throughBlockContent<T>.Metadata
orPreEvaluationBlockHeader.Metadata
.PreEvaluationBlockHeader
can be accessed throughPreEvaluationBlock<T>.Header
orBlockHeader.Header
.BlockHeader
can be accessed throughBlock<T>.Header
(this has not changed, but only listed here for completeness in narrative).
- (Libplanet.Explorer) Added
updatedStates
,updatedFungibleAssets
,fungibleAssetsDelta
GraphQL fields toTxResultType
. [#2353] - (Libplanet.Explorer) Added
nextNonce
query inTransactionQuery<T>
. [#2356, #2366]
Behavioral changes
- Many types became serialized and deserialized better with
System.Text.Json.JsonSerializer
as they now have their own custom converters. Note that these serializations are unavailable on Unity due to its incomplete reflection support. [#2294, #2322]- An
Address
became represented as a single hexadecimal string in JSON. [#2322] - A
BlockHash
became represented as a single hexadecimal string in JSON. [#2322] - A
Currency
became represented as an object with values in JSON. Note that it contains itsHash
and it throwsJsonException
if a JSON object to deserialize has an inconsistentHash
with other field values. [#2322] - A
FungibleAssetValue
became represented as an object with itsCurrency
object andQuantity
string. [#2322] - A
HashDigest<T>
became represented as a single hexadecimal string in JSON. [#2322] - A
Transaction<T>
became represented as an object with values in JSON. [#2294] - A
TxId
became represented as a single hexadecimal string in JSON. [#2322] - System actions became represented as a Bencodex JSON Representation
of their
PlainValue
withtype_id
field. [#2294]
- An
- System actions'
GetHashCode()
andEquals(object)
methods now check value equality (rather than reference equality). [#2294] - A
ValidateAppProtocolVersion
became allow validation of different extra. [#2380]
Bug fixes
- Interface methods
IComparable.CompareTo()
andIComparable<T>.CompareTo()
forAddress
are now accessible. [#2384]
Dependencies
- Added @planetarium/tx npm package. [#2294]
- Now depends on Bencodex.Json 0.7.0-dev.20220923062846. [#2294]
- Upgrade Bencodex from 0.6.0 to 0.7.0-dev.20220923062845. [#2294]
- Upgrade System.Text.Json from 4.7.2 to 6.0.6. [#2322]
CLI tools
- Added
planet tx
subcommand group. [#2294]- Added
planet tx analyze
subcommand. - Added
planet tx help
subcommand.
- Added
Version 0.42.2
Released on September 29, 2022.
- (Libplanet.Explorer) Fixed a bug of
TransactionQuery<T>
thatbindSignature()
had errored ifunsignedTransaction
has a system action. [#2358]
Version 0.42.1
Released on September 23, 2022.
- Fixed a bug where
Transaction<T>.ToBencodex(bool)
method had incorrectly serializedSystemAction
. [#2339]
Version 0.42.0
Released on September 19, 2022.
Backward-incompatible API changes
- Renamed
BlockChain<T>.MakeTransaction(PrivateKey, IEnumerable<T>, IImmutableSet<Address>, DateTimeOffset?)
method'sactions
parameter tocustomActions
. [#2151, #2273] - Changed
IBlockPolicy.GetMaxBlockBytes()
toIBlockPolicy.GetMaxTransactionBytes()
. Behaviourally, this is now used as an upper limit for the encoded size ofBlock<T>.Transactions
instead ofBlock<T>
. [#2290, #2291]- (Libplanet.Explorer) Changed
Options.MaxBlockBytes
toOptions.MaxTransactionsBytes
andOptions.MaxGenesisBytes
toOptions.MaxGenesisTransactionsBytes
. - (Libplanet.Explorer) Changed executable argument
max-block-bytes
tomax-transactions-bytes
andmax-genesis-bytes
tomax-genesis-transactions-bytes
. - All public method parameter names
maxBlockBytes
changed tomaxTransactionsBytes
.
- (Libplanet.Explorer) Changed
Added APIs
Address
now implementsIEquatable<Address>
interface. [#2320]TxId
now implementsIEquatable<TxId>
interface. [#2320]- Added
BlockChain<T>.MakeTransaction(PrivateKey, IAction, IImmutableSet<Address>, DateTimeOffset?)
overloaded method. [#2151, #2273] - Added
GetInnerActionTypeName()
method. [#1910, #2189] - (Libplanet.Explorer) Added
LibplanetExplorerSchema
class. [#2065, [#2198]]
Dependencies
Version 0.41.4
Released on September 29, 2022.
- (Libplanet.Explorer) Fixed a bug of
TransactionQuery<T>
thatbindSignature()
had errored ifunsignedTransaction
has a system action. [#2358]
Version 0.41.3
Released on September 23, 2022.
- Fixed a bug where
Transaction<T>.ToBencodex(bool)
method had incorrectly serializedSystemAction
. [#2339]
Version 0.41.2
Released on September 13, 2022.
- Fixed a bug where
NetMQTransport
is not correctly disposed of due toNetMQTransport._router
already being stopped in prior to_router.Unbind()
call inNetMQTransport.Dispose()
. [#2311]
Version 0.41.1
Released on August 31, 2022.
- Fixed a bug where
Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?)
method had thrownArgumentNullException
with valid arguments. [#2268, #2270]
Version 0.41.0
Released on August 26, 2022.
Deprecated APIs
- (Libplanet.Net) Removed
NetMQTransport()
constructor. UseNetMQTransport.Create()
instead. [#2215] - Unused
TcpMessageCodec
class removed. [#2216] - (Libplanet.Stun) Removed
TurnClient.IsConnectable()
method. [#2219] - (Libplanet.Stun) Removed
TurnClient.BindProxies()
method. [#2219] - (Libplanet.Stun) Removed
TurnClient()
constructor. UseTurnClient.Create()
instead. [#2219] - (Libplanet.Net) Removed
Peer
class. UseBoundPeer
instead. [#2233]
Backward-incompatible API changes
- Removed unused transaction related methods from
IStore
and its implementations. [#1538, #2201]IterateTransactionIds()
DeleteTransaction()
CountTransactions()
- Removed
Currency(string, byte, IImutableSet<Address>?)
constructor. [#2200] - Removed
Currency(string, byte, Address?)
constructor. [#2200] - Added static methods of
Currency
that defines different kinds ofCurrency
. [#2200]- Added
Currency.Capped(string, byte, (BigInteger, BigInteger), IImutableSet<Address>?)
static method which defines an instance ofCurrency
with a hard limit on the maximum minted supply. - Added
Currency.Capped(string, byte, (BigInteger, BigInteger), Address)
static method which defines an instance ofCurrency
with a hard limit on the maximum minted supply. - Added
Currency.Uncapped(string, byte, IImutableSet<Address>?)
static method which defines an instance ofCurrency
without an enforced maximum supply limit. - Added
Currency.Uncapped(string, byte, Address)
static method which defines an instance ofCurrency
without an enforced maximum supply limit. - OBSOLETE, ONLY FOR LEGACY SUPPORT: Added
Currency.Legacy(string, byte, IImutableSet<Address>?)
static method which defines a legacyCurrency
instance which is compatible withCurrency
instances defined before total supply tracking support was introduced. - OBSOLETE, ONLY FOR LEGACY SUPPORT: Added
Currency.Legacy(string, byte, Address)
static method which defines a legacyCurrency
instance which is compatible withCurrency
instances defined before total supply tracking support was introduced. - NOTE: if you already have some
Currency
instances defined in prior to the addition of total supply tracking on a live chain, you cannot modify the already-definedCurrency
instances as a capped or uncappedCurrency
but have to define them withCurrency.Legacy()
as the new Currency kinds are internally backwards-incompatible with the legacyCurrency
.
- Added
- Added
IAccountStateDelta.TotalSupplyUpdatedCurrencies
property. [#915, #2200] - Added
IAccountStateView.GetTotalSupply(Currency)
method. [#915, #2200] - Added
IBlockChainStates<T>.GetTotalSupply(Currency, BlockHash, TotalSupplyStateCompleter<T>
method which gets the total supply of aCurrency
inFungibleAssetValue
from the state, and if not found, returns null. [#915, #2200] - (Libplanet.Net)
ITransport.AsPeer
andSwarm<T>.AsPeer
type changed fromPeer
toBoundPeer
. [#2215] - (Libplanet.Net) All public return type, parameter type, and property type
of
Peer
changed toBoundPeer
. [#2228] - (Libplanet.Net) Additional public return type, parameter type, and
property type of
Peer
that weren't handled by #2228 changed toBoundPeer
. [#2233] - Reworked constructors of exception classes. Affected classes are:
- (Libplanet.Net)
PingTimeoutException
CurrencyPermissionException
,DuplicateActionTypeIdentifierException
,InsufficientBalanceException
,InvalidBlockPreEvaluationHashException
,InvalidBlockProtocolVersionException
,InvalidBlockPublicKeyException
,InvalidBlockSignatureException
,InvalidBlockStateRootHashException
,InvalidBlockTotalDifficultyException
,InvalidGenesisBlockException
,InvalidTxException
,InvalidTxGenesisHashException
,InvalidTxIdException
,InvalidTxNonceException
,InvalidTxSignatureException
,MissingActionTypeException
,NoKeyException
,SupplyOverflowException
,TotalSupplyNotTrackableException
,TxPolicyViolationException
,UnexpectedlyTerminatedActionException
. [#2239, #2241]
- (Libplanet.Net)
Added APIs
- Added
Currency.MaximumSupply
property. [#915, #2200] - Added
Currency.TotalSupplyTrackable
field. [#915, #2200] - Added
SupplyOverflowException
class. [#915, #2200] - Added
TotalSupplyGetter
delegate. [#915, #2200] - Added
TotalSupplyStateCompleter<T>
delegate. [#915, #2200] - Added
TotalSupplyStateCompleters<T>
static class. [#915, #2200] - Added
StateCompleterSet<T>.TotalSupplyStateCompleter
property. [#915, #2200] - (Libplanet.Net) Added
BoundPeer.PeerString
property. [#2187, #2232] - (Libplanet.Stun) Added
IIceServer
interface. [#2219] - (Libplanet.Stun) Added
TurnClient.Create()
static method. [#2219] - (Libplanet.Explorer) Added
stateQuery
field to the root node of GraphQL endpoint. [#2149, #2227] - (Libplanet.Explorer) Added
blockPolicy
field to the root node of GraphQL endpoint. [#2149, #2227] - (Libplanet.Explorer) Added
CurrencyType
class. In GraphQL, it corresponds toCurrency
type. [#2149, #2227] - (Libplanet.Explorer) Added
FungibleAssetValueType
class. In GraphQL, it corresponds toFungibleAssetValue
type. [#2149, #2227] - (Libplanet.Explorer) Added
StateQuery<T>
class. In GraphQL, it corresponds toStateQuery
type. [#2149, #2227] - (Libplanet.Explorer) Added
BlockPolicyType<T>
class. In GraphQL, it corresponds toBlockPolicy
type. [#2149, #2227]
Behavioral changes
- Bencodex related methods in
Currency
now accounts for the maximum supply and total supply tracking. [#915, #2200]- For capped currencies,
Currency.Serialize()
method stores themajor
andminor
values of the maximum supply asInteger
values under the keysmaximumSupplyMajor
andmaximumSupplyMinor
. For uncapped and legacy untracked currencies, the entries are omitted. Currency(IValue)
constructor now looks for the maximum supply and total supply trackability in the given dictionary and restores them if found.
- For capped currencies,
Currency
's implementation ofISerializable
now accounts for the maximum supply and total supply tracking. [#915, #2200]Currency
's implementation ofISerializable.GetObjectData
now stores the maximum supply if theCurrency
is capped.Currency(SerializationInfo, StreamingContext)
constructor now looks for the maximum supply and total supply trackability and restores it if found.
IAccountStateDelta.MintAsset(Address, FungibleAssetValue)
andIAccountStateDelta.BurnAsset(Address, FungibleAssetValue)
methods now track the total supply if the total supply of theCurrency
is trackable. [#915, #2200]IAccountStateDelta.MintAsset(Address, FungibleAssetValue)
method now throwsSupplyOverflowException
if the sum of current total supply and the value to be minted exceeds the maximum supply of theCurrency
instance.
- (Libplanet.Net)
NetMQTransport
's general behavior has changed. [#2215]NetMQTransport
is now able to send requests and receive replies as soon as it is created throughNetMQTransport.Create()
factory method.NetMQTransport.StartAsync()
enables aNetMQTransport
instance to receive requests and send replies.NetMQTransport.StopAsync()
only disables aNetMQTransport
instance to stop receiving requests and sending replies.
Version 0.40.3
Released on September 29, 2022.
- (Libplanet.Explorer) Fixed a bug of
TransactionQuery<T>
thatbindSignature()
had errored ifunsignedTransaction
has a system action. [#2358]
Version 0.40.2
Released on September 23, 2022.
- Fixed a bug where
Transaction<T>.ToBencodex(bool)
method had incorrectly serializedSystemAction
. [#2339]
Version 0.40.1
Released on August 31, 2022.
- Fixed a bug where
Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?)
method had thrownArgumentNullException
with valid arguments. [#2268]
Version 0.40.0
Released on August 12, 2022.
Deprecated APIs
Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[])
constructor is now deprecated. UseTransaction<T>(ITxMetadata, IEnumerable<T>, byte[])
constructor orTransaction<T>.Create()
static method instead. [#2175]Transaction<T>.Actions
property is now deprecated. UseTransaction<T>.SystemAction
property orTransaction<T>.CustomActions
property instead. [#2149, #2151, #2175]IPreEvaluationBlockHeader.HashAlgorithm
property and its implementations removed. [#2206, #2207]IBlockPolicy.GetHashAlgorithm(long)
method and its implementations removed. [#2206, #2207]InvalidBlockHashAlgorithmTypeException
class removed. [#2206, #2207]HashAlgorithmGetter
delegate removed. [#2206, #2207]
Backward-incompatible API changes
- The type of
Transaction<T>.Actions
property becameIImmutableList<IAction>
(wasIImmutableList<T>
whereT : IAction, new()
). [#2149, #2151, #2175] - Renamed parameters named
actions
of many methods tocustomActions
. [#2149, #2151, #2175]- Renamed
Transaction<T>(ITxMetadata, IEnumerable<T>, byte[])
constructor's parameteractions
tocustomActions
. - Renamed
Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[])
constructor's parameteractions
tocustomActions
. - Renamed
Transaction<T>.Create(long, PrivateKey, BlockHash?, IEnumerable<T>, IImmutableSet<Address>?, DateTimeOffset?)
static method's parameteractions
tocustomActions
. - Renamed
Transaction<T>.CreateUnsigned(long, PrivateKey, BlockHash?, IEnumerable<T>, IImmutableSet<Address>?, DateTimeOffset?)
static method's parameteractions
tocustomActions
. - Renamed
TxMetadata.ToBencodex(IEnumerable<IValue>, IImmutableArray<byte>?)
method's parameteractions
tocustomActions
.
- Renamed
- Added
IBlockPolicy<T>.NativeTokens
property. [#2149, #2150, #2175] - Added option
IImmutableSet<Currency>? nativeTokens
toBlockPolicy<T>()
constructor as its last parameter. [#2149, #2150, #2175] - Added
IActionContext.IsNativeToken(Currency)
method. [#2149, #2150, #2175] - Added parameter
Predicate<Currency> nativeTokenPredicate
to allPreEvaluationBlock<T>.Evaluate()
method as its second parameter (parameterIStateStore stateStore
remains at the last). [#2149, #2150, #2175] - Added parameter
Predicate<Currency> nativeTokenPredicate
to allPreEvaluationBlock<T>.DetermineStateRootHash()
overloads as their second parameter (existing second and rest parameters were shifted). [#2149, #2150, #2175] - Added parameter
Predicate<Currency> nativeTokenPredicate
toBlockChain<T>.MakeGenesisBlock()
method as its last parameter. [#2149, #2150, #2175] - Added parameter
Predicate<Currency> nativeTokenPredicate
toActionEvaluator<T>()
constructor as its last parameter. [#2149, #2150, #2175] - Removed
ChainIdNotFoundException
class. [#2047, #2156] - Added
IStore.GetCanonicalGenesisBlock(HashAlgorithmGetter)
method. [#2162, #2171] - Parameter
HashAlgorithmType hashAlgorithm
removed fromBlockChain<T>.MakeGenesisBlock()
method. [#2206, #2207] - Parameter
HashAlgorithmType hashAlgorithm
removed fromBlockContent<T>.Mine()
method. [#2206, #2207] - Parameter
HashAlgorithmType hashAlgorithm
removed fromPreEvaluationBlock<T>()
constructors. [#2206, #2207] - Parameter
HashAlgorithmType hashAlgorithm
removed fromPreEvaluationBlockHeader<T>()
constructors. [#2206, #2207] - Parameter
HashAlgorithmType hashAlgorithm
removed fromBlockMetadata<T>.DerivePreEvaluationHash()
method. [#2206, #2207] - Parameter
HashAlgorithmType hashAlgorithm
removed fromBlockMetadata<T>.MineNonce()
methods. [#2206, #2207] - Return type for
BlockMarshaler .UnmarshalPreEvaluationBlockHeader(Dictionary)
changed from(BlockMetadata, Nonce, ImmutableArray<bytes>?)
toPreEvaluationBlockHeader
. Removed overload methodBlockMarshaler .UnmarshalPreEvaluationBlockHeader(HashAlgorithm, Dictionary)
. [#2206, #2207] - Parameter
HashAlgorithmGetter hashAlgorithmGetter
removed fromBlockMarshaler.UnmarshalBlockHeader()
method. [#2206, #2207] - Parameter
HashAlgorithmGetter hashAlgorithmGetter
removed fromIStore<T>.GetCanonicalGenesisBlock<T>()
andIStore<T>.GetBlock<T>()
interface methods and their implementations. [#2206, #2207] - Parameter
HashAlgorithmGetter hashAlgorithmGetter
removed fromBlockSet<T>()
constructor. [#2206, #2207] - Parameter
HashAlgorithmGetter hashAlgorithmGetter
removed fromBlockDigest.GetHeader()
method. [#2206, #2207] - Parameter
HashAlgorithmGetter hashAlgorithmGetter
removed fromDelayedRenderer<T>()
constructor. [#2206, #2207] - Parameter
HashAlgorithmGetter hashAlgorithmGetter
removed fromDelayedActionRenderer<T>()
constructor. [#2206, #2207] - (Libplanet.Node) Parameter
HashAlgorithmGetter hashAlgorithm
removed fromUntypedBlock()
constructor. [#2206, #2207]
Added APIs
- (Libplanet.Explorer) Added
TransactionMutation<T>
class. [#2130] - (Libplanet.Explorer) Added
unsignedTransaction
,bindSignature
andtransactionResult
GraphQL fields toTransactionQuery<T>
. [#2130] - Added
Transaction<T>.SystemAction
property. [#2149, #2151, #2175] - Added
Transaction<T>.CustomActions
property. [#2149, #2151, #2175] - Added overloads to take
systemAction
besides the existing constructors and methods takingcustomActions
. [#2149, #2151, #2175]- Added
Transaction<T>(ITxMetadata, IAction, byte[])
overloaded constructor. - Added
Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?)
overloaded static method. - Added
Transaction<T>.CreateUnsigned(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?)
overloaded static method. - Added
TxMetadata.ToBencodex(IValue, ImmutableArray<byte>?)
overloaded method.
- Added
- Introduced new system built-in actions. [#2149, #2150, #2175]
- Added
Mint
class. - Added
Transfer
class.
- Added
- Added
NonNativeTokenException
class. [#2149, #2150, #2175] - Added
BlockLocator
class. [#1762, #2140] - Added methods required for decoupling Libplanet.Net from
Libplanet. [#1762, #2140]
- Added
BlockChain<T>.FindNextHashes(BlockLocator, BlockHash?, int)
method. - Added
BlockChain<T>.Fork(BlockHash, bool)
method. - Added
BlockChain<T>.GetBlockLocator(int)
method.
- Added
- Added
IActionContext.GenesisHash
property. [#1972, #2179] - Added
ActionEvaluator<T>.GenesisHash
property. [#1972, #2179] - Added
IAccountStateView
interface. [#2183] IAccountStateDelta
now inheritsIAccountStateView
interface. [#2183]- Added
BlockMetadata.HashAlgorithmType
static property. [#2206, #2207] - Added
BlockMarshaler.UnmarshalNonce(Dictionary)
andBlockMarshaler.UnmarshalPreEvaluationHash(Dictionary)
methods. [#2206, #2207]
Behavioral changes
BlockChain<T>.PerceiveBlock()
method now uses millisecond precision for perceive time of newly perceived blocks. [#2155, #2159]- Nonexistent chain ids in
IStore
are now considered to be chain ids of empty chains. [#2047, #2156] Libplanet.Explorer
now targets .NET 6.0. [#2173]- Behavior of
Block<T>.GetHashCode()
changed. [#2206, #2207]
Version 0.39.0
Released on July 18th, 2022.
Deprecated APIs
- (Libplanet.Net) Removed
TcpTransport
class. [#2139] - (Libplanet.Net) Removed
InvalidMagicCookieException
class. [#2139] - (Libplanet.Net) Removed
SwarmOptions.TransportType
property. [#2139] - (Libplanet.Node) Removed
InitConfig.TransportType
property. [#2139]
Added APIs
- Added
DuplicateActionTypeIdentifierException
class. [#2142]
Behavioral changes
- (Libplanet.Net) Raised the default value for
Swarm<T>()
constructor'sworkers
parameter to 100. [#2128, #2134] - (Libplanet.Explorer) Raised the default value for
workers
console argument to 100. [#2128, #2134] PolymorphicAction<T>
now allows subclasses ofT
to be declared in the entry assembly of the application besides the same assembly asT
. [#2136, #2142]PolymorphicAction<T>
now throwsDuplicateActionTypeIdentifierException
when multiple subtypes ofT
are associated with the sameActionTypeAttribute.TypeIdentifier
. [#2142]
Bug fixes
- Fixed a bug where
PrivateKey()
constructor had returned an invalid key less than 32 bytes. [#1696, #2091] - (Libplanet.Net) Invalid
Uri.UserInfo
with multiple colons is now rejected byIceServer(Uri url)
constructor and exception is thrown. [#2058, #2116]
CLI tools
- (Libplanet.Extensions.Cocona) Upgraded Cocona.Lite from 1.6.* to 2.0.*. [#2101]
- Implemented planet key derive, now you can get public key and address from private key directly! [#2108]
- (Libplanet.Extensions.Cocona) Removed
DerivationCommand
class. [#2118]
Version 0.38.0
Released on June 7th, 2022.
Backward-incompatible API changes
- (Libplanet.Net) Removed
username
andcredential
parameters fromIceServer(string, string?, string?)
andIceServer(Uri, string?, string?)
. [#2048, #2049] - (Libplanet.Net) Properties
IceServer.Username
andIceServer.Credential
are no longer nullable. [#2048, #2049]
Added APIs
- (Libplanet.Node) Added
NetworkConfig
class. [#1946, #2000] - (Libplanet.Node) Added
NodeConfig
class. [#1946, #2000] - (Libplanet.Node) Added
NodeUtils
class. [#2013] - (Libplanet.Node) Added
SwarmConfig
,InitConfig
,BootstrapConfig
PreloadConfig
, andSyncConfig
classes. [#2021]
Behavioral changes
- Added
PrivateKey(string)
constructor for hexadecimal string. [#2012, #2022] - Allow
0x
prefix forAddress
class constructor.DeriveAddress
method will remove0x
prefix string. [#2015, #2018]
Version 0.37.0
Released on May 30th, 2022.
Backward-incompatible API changes
- (Libplanet.Net) Removed
SwarmOptions.BootstrapDialTimeout
. UseSwarmOptions.BootstrapOptions.DialTimeout
instead. [#2024] - (Libplanet.Net) Added
Swarm<T>.BootstrapAsync(CancellationToken)
which utilizes values stored inBootstrapOptions
. [#2024] - (Libplanet.Net) Parameter name
depth
changed tosearchDepth
forSwarm<T>.BootstrapAsync(IEnumerable<Peer>, TimeSpan?, int, CancellationToken)
and made non-optional. [#2024] - (Libplanet.Net)
Swarm<T>.BootstrapAsync(IEnumerable<Peer>, depth, CancellationToken)
removed. [#2024] - (Libplanet.Net) Removed
SwarmOptions.PreloadDialTimeout
. UseSwarmOptions.PreloadOptions.DialTimeout
instead. [#2025] - (Libplanet.Net) Added
Swarm<T>.PreloadAsync(IProgress<PreloadState>, bool, CancellationToken)
. [#2025] - (Libplanet.Net) Changed the order of parameters from
Swarm<T>(TimeSpan, IProgress<PreloadState>, bool, long, CancellationToken)
toSwarm<T>( TimeSpan?, long, IProgress<PreloadState>, bool, CancellationToken)
with default value fortipDeltaThreshold
removed. [#2025] - (Libplanet.Net) Parameter name
Urls
changed toUrl
forIceServer
and no longer accepts multiple Urls for single instance. [#2026]
Added APIs
- (Libplanet.Net) Added
BootstrapOptions
class. [#2024] - (Libplanet.Net) Added
BootstrapOptions
property toSwarmOptions
. [#2024] - (Libplanet.Net) Added
PreloadOptions
class. [#2025] - (Libplanet.Net) Added
PreloadOptions
property toSwarmOptions
. [#2025]
Version 0.36.1
Released on May 26th, 2022.
- Fixed
Transaction<T>()
constructor's bug that it had thrownKeyNotFoundException
when a Bencodex dictionary without signature. [#2005]
Version 0.36.0
Released on May 25th, 2022.
Backward-incompatible API changes
- Removed
InvalidTxPublicKeyException
class. [#1164, #1978] - (Libplanet.Net) Property
SwarmOptions.BlockDownloadTimeout
removed. [#1981, #1982] - (Libplanet.Net)
Swarm<T>.BootstrapAsync(IEnumerable<Peer>, TimeSpan?, TimeSpan?, int, CancellationToken)
changed toSwarm<T>.BootstrapAsync( IEnumerable<Peer>, TimeSpan?, int, CancellationToken)
. ParameterdialTimeout
now gets used for both oldpingSeedTimeout
andfindNeighborsTimeout
. [#1990] - (Libplanet.Net)
IProtocol.BootstrapAsync(IEnumerable<BoundPeer>, TimeSpan?, TimeSpan?, int, CancellationToken)
changed toIProtocol.BootstrapAsync( IEnumerable<Peer>, TimeSpan?, int, CancellationToken)
. ParameterdialTimeout
now gets used for both oldpingSeedTimeout
andfindNeighborsTimeout
. [#1990]
Added APIs
- Introduced Libplanet.Node package. [#1974, #1978]
- Added
ITxMetadata
interface. [#1164, #1974, #1978] - Added
TxMetadata
class. [#1164, #1974, #1978] - Added
ITxExcerpt
interface. [#1164, #1974, #1978] - Added
TxExcerptExtensions
static class. [#1164, #1974, #1978] Transaction<T>
now implementsITxExcerpt
interface. [#1164, #1974, #1978]- Added
Transaction<T>(ITxMetadata, IEnumerable<T>, byte[])
constructor. [#1164, #1978] - Added
TxId.FromString()
static method. [#1978] - (Libplanet.Node) Added
UntypedTransaction
class. [#1974, #1978] - (Libplanet.Node) Added
UntypedBlock
class. [#1974, #1978]
Behavioral changes
Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[])
constructor became to ignore its second parameterAddress signer
. Instead,Transaction<T>.Signer
property is now automatically derived from itsPublicKey
. [#1164, #1978]
Bug fixes
- Fixed
InvalidOperationException
thrown byPublicKey.Verify()
method ifsignature
is adefault(ImmutableArray<byte>)
. Instead, it silently returnsfalse
now. [#1978] - Fixed
NullReferenceException
thrown byByteUtil.Hex(in ImmutabelArray<byte>)
method if adefault(ImmutableArray<byte>)
is present. Instead, it silently returns an empty string now. [#1978] - Fixed a
TxId(byte[])
constructor's bug whereParamName
andMessage
ofArgumentOutOfRangeException
it had thrown had been reversed. [#1978]
Version 0.35.1
Released on May 23rd, 2022.
Bug fixes
- (Libplanet.Net) Wrongly assigned default value to
TimeoutOptions.PreloadDialTimeout
fixed. [#1983]
Version 0.35.0
Released on May 20th, 2022.
Deprecated APIs
- (Libplanet.Net) Unused property
SwarmOptions.PollInterval
removed. [#1962]
Backward-incompatible API changes
BlockCompletion<TPeer, TAction>.Complete()
no longer accepts neither parameterTimeSpan singleSessionTimeout
norint millisecondsSingleSessionTimeout
to regulate a single session length. [#1961]- (Libplanet.Net) General API changes made to
Swarm<T>.BootstrapAsync()
,Swarm<T>.PreloadAsync()
, andSwarm<T>.StartAsync()
. [#1962]Swarm<T>.BootstrapAsync(IEnumerable<Peer>, double, double, int, CancellationToken)
replaced withSwarm<T>.BootstrapAsync(IEnumerable<Peer>, int, CancellationToken)
which uses default values provided bySwarmOptions
forpingSeedTimeout
andfindPeerTimeout
.Swarm<T>.StartAsync(int, int, int CancellationToken)
replaced withSwarm<T>.StartAsync(CancellationToken)
which uses default values provided bySwarmOptions
formillisecondsDialTimeout
,millisecondsBroadcastBlockInterval
andmillisecondsBroadcastTxInterval
.Swarm<T>.PreloadAsync(IProgress<PreloadState>, bool, long, CancellationToken)
overload method added andSwarm<T>.PreloadAsync(TimeSpan?, IProgress<PreloadState>, bool long, CancellationToken)
changed toSwarm<T>.PreloadAsync( TimeSpan, IProgress<PreloadState>, bool, long, CancellationToken)
- (Libplanet.Net)
TimeoutOptions
property added toSwarmOptions
with all timeout related options moved fromSwarmOptions
toTimeoutOptions
. [#1957, #1962]
Added APIs
- Added
StoreLoader
delegate. [#1359, #1953, #1955] - Added
StoreLoaderAttribute
class. [#1359, #1953, #1955] - Added
TrieStateStore.Secure
property. [#1955] - Added
NameValueCollectionExtensions
static class. [#1955] - Type support for
Guid
added toDataModel
. [#1959, #1960] TimeoutOptions
class added. [#1957, #1962]SwarmOptions.BlockBroadcastInterval
andSwarmOptions.TxBroadcastInterval
properties added. [#1962]TimeSpanExtensions.Multiply()
method added. [#1966]
Behavioral changes
DefaultStore
andDefaultKeyValueStore
-backedTrieStateStore
now can be instantiated with URI schemedefault+file:
usingStoreLoaderAttribute.LoadStore()
method. [#1359, #1953, #1955]MemoryStore
andMemoryKeyValueStore
-backedTrieStateStore
now can be instantiated with URI schemememory:
usingStoreLoaderAttribute.LoadStore()
method. [#1359, #1953, #1955]- (Libplanet.RocksDBStore)
RocksDBStore
andRocksDBKeyValueStore
-backedTrieStateStore
now can be instantiated with URI schemerocksdb+file:
usingStoreLoaderAttribute.LoadStore()
method. [#1359, #1953, #1955]
CLI tools
- The following store URI schemes are deprecated: [#1573, #1955]
default
: Usedefault+file
instead.rocksdb
: Userocksdb+file
instead.
Version 0.34.0
Released on May 13th, 2022.
Added APIs
- Class
DataModel
added. When inherited, this class assists in automatic encoding and decoding to and fromBencodex.Types.Dictionary
. [#1932, #1935]
Behavioral changes
TxPolicyViolationException
andInvalidTxException
now have a new constructor that takes anException
as theirException.InnerException
. [#1830, #1912, #1916]
CLI tools
- Added
planet key sign
to sign a message. [#1920]
Version 0.33.1
Released on April 28th, 2022.
Behavioral changes
Transaction<T>
's relatively heavy policy validation is deferred until after its nonce validation in order to speed up gatheringTransaction<T>
s when mining. [#1924]
Version 0.33.0
Released on April 19th, 2022.
Backward-incompatible API changes
- (Libplanet.Net)
IMessageCodec
and its implementationsNetMQMessageCodec
andTcpMessageCodec
overhauled. [#1906]AppProtocolVersion
type parameter added toIMessageCodec.Encode()
.- Both
NetMQMessageCodec()
andTcpMessageCodec()
constructors are made parameterless. IMessageCodec.Decode()
no longer throwsInvalidMessageTimestampException
orDifferentAppProtocolVersionException
.
- (Libplanet.Net) Irrelevant context related properties removed from
InvalidMessageTimestampException
andDifferentAppProtocolVersionException
. [#1906]InvalidMessageTimestampException.Peer
property removed.DifferentAppProtocolVersionException.Peer
property removed.DifferentAppProtocolVersionException.Identity
property removed.
- (Libplanet.Net) Both
MessageValidator.ValidateTimestamp()
andMessageValidator.ValidateAppProtocolVersion()
now only accepts singleMessage
type parameter. [#1906] - (Libplanet.Net)
SendMessageFailedException
changed toSendMessageFailException
. [#1911] - (Libplanet.Net)
ITransport
exception handling overhauled. [#1911]ITransport.SendMessageAsync()
now only throwsCommunicationFailException
for a normal failure of sending and receivingMessage
s; old exceptions such asTimeoutException
,InvalidMessageSignatureException
, etc. are attached toInnerException
property to a thrownCommunicationFailException
.InvalidCredentialException
,InvalidMagicCookieException
,InvalidMessageSignatureException
,SendMessageFailException
no longer have public constructors.
Added APIs
- (Libplanet.Net)
InvalidCredentialException
class added. [#1904, #1905] - (Libplanet.Net)
CommunicationFailException
class added. [#1911]
Behavioral changes
- Inner logic of
ByteUtil.CalculateHashCode(byte[] bytes)
has modified. [#1866, #1891] - (Libplanet.Net)
IMessageCodec.Encode()
now requires a matchingPrivateKey
to be provided forPeer
. [#1904, #1905]
Dependencies
Version 0.32.1
Released on April 8th, 2022.
Behavioral changes
- (Libplanet.Net)
ITransport
's behavior rolled back to send replies withDifferentVersion
typeMessage
to aPeer
with a differentAppProtocolVersion
regardless of whether theAPV
fromPeer
is signed by a trusted source or not. [#1900]
Version 0.32.0
Released on April 8th, 2022.
Backward-incompatible API changes
- Added
IStore.PruneOutdatedChains(bool noopWithoutCanon)
method. [#1874, #1878] IMessageCodec
interface and its implementations overhauled. [#1890]- Removed
AppProtocolVersion version
parameter fromIMessageCodec.Encode()
. - Removed
Action appProtocolVersionValidator
parameter fromIMessageCodec.Decode()
. - Both
TcpMessageCodec()
andNetMQMessageCodec()
now takes additional parameters for setting up itsMessageValidator
instance for running context.
- Removed
DifferentAppProtocolVersionEncountered
delegate now returnsvoid
. [#1885, #1890]
Added APIs
- (Libplanet.Net)
DifferentAppProtocolVersionException
is madepublic
. [#1889] - (Libplanet.Net)
InvalidMessageSignatureException
andInvalidMessageTimestampException
gained additional properties. [#1889] - (Libplanet.Net)
MessageValidator
helper class introduced. [#1890]
Behavioral changes
- (Libplanet.Net) Internal cache size of a
KBucket
is now capped. [#1879] - (Libplanet.Net)
IMessageCodec
now never decodes aMessage
with a differentAppProtocolVersion
from the local version. [#1885, #1890] - (Libplanet.Net)
ITransport
no longer replies withDifferentVersion
typeMessage
to aPeer
with a differentAppProtocolVersion
that is not signed by a trusted source. [#1890]
Bug fixes
- (Libplanet.Net) Internal dictionaries of a
KBucket
are made to be concurrent. [#1872, #1879] - (Libplanet.Net)
DifferentAppProtocolVersionException
andInvalidMessageSignatureException
can now be serialized and deserialized. [#1889]
Version 0.31.0
Released on March 31, 2022.
Backward-incompatible API changes
- (Libplanet.Net) Existing method name
Kademlia.CalculateDistance()
changed toKademlia.CalculateDifference()
to better indicate its behavior. [#1877] - (Libplanet.Net)
Kademlia.CalculateDistance()
method reimplemented with return typeint
. [#1877]
Bug fixes
- (Libplanet.Stun) Increased the number of internal proxies to increase
the inbound network traffic throughput of a node when using a
TurnClient
. [#1864, #1876]
Version 0.30.0
Released on March 24, 2022.
Backward-incompatible storage format changes
- (Libplanet.RocksDBStore)
RocksDBStore
became not to use column families to manage chain ids. Instead, chain id is concatenated into key prefix. [#1862]
CLI tools
- Added
planet store migrate-index
for index database migration (from column families based to key-prefix). [#1862]
Version 0.29.0
Released on March 17, 2022.
Backward-incompatible API changes
- (Libplanet.Net)
SwarmOptions.MessageLifespan
property changed toSwarmOptions.MessageTimestampBuffer
. [#1828, #1831] - (Libplanet.Net) Unused parameter
dealerSocketLifetime
removed fromNetMQTransport()
. [#1832] - (Libplanet.Net) Old
ITransport.SendMessageAsync()
method is deprecated.ITransport.SendMessageWithReplyAsync()
methods are renamed asITransport.SendMessageAsync()
. [#1849]
Behavioral changes
- (Libplanet.Net) Default value of
SwarmOptions.MessageTimestampBuffer
is set to 60 seconds instead ofnull
. [#1828, #1831] - (Libplanet.Net) Acceptable timestamp range for
Message
s, when non-nullSwarmOptions.MessageTimestampBuffer
is provided, has changed to allowMessage
s with future timestamps. [#1828, #1831] - (Libplanet.Net)
Swarm<T>
now repliesPong
s to receivedTxIds
andBlockHeaderMessage
messages. [#1845]
Version 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, #1852]
Version 0.28.1
Released on March 3, 2022.
- Fixed an evaluation log to output
IPreEvaluationBlock<T>.PreEvaluationHash
as a hex formatted string. [#1835, #1837] - (Libplanet.Net) Fixed a bug where some messages could not be sent using
NetMQTransport
due to prematureDealerSocket
disposal. [#1836, #1839]
Version 0.28.0
Released on February 23, 2022.
Deprecated APIs
Backward-incompatible API changes
- The return type of
MerkleTrieExtensions.DifferentNodes()
becameIEnumerable<Tuple<KeyBytes, IValue, IValue>>
fromIEnumerable<IGrouping<string, (HashDigest<SHA256> Root, IValue Value)>>
. [#1729] - (Libplanet.Extensions.Cocona) Replaced
string? passphrase = null
parameter of methods belongingKeyCommand
andApvCommand
withPassphraseParameters passphrase
. [#1593, #1823] - (Libplanet.Extensions.Cocona) Replaced
KeyCommand.UnprotectKey(Guid keyId, string? passphrase = null)
method withUnprotectedKey(Guid, PassphraseParameters, bool)
method. [#1593, #1823] - (Libplanet.Net)
IMessageCodec<T>.Decode()
now throwsInvalidMessageSignatureException
andInvalidMessageTimestampException
instead ofInvalidMessageException
andInvalidTimestampException
respectively. [#1771] - (Libplanet.Net) Added
long tipDeltaThreshold = 25L
option toSwarm<T>.PreloadAsync()
method. [#1775, #1777, #1779]
Backward-incompatible network protocol changes
Backward-incompatible storage format changes
Added APIs
- (Libplanet.Extensions.Cocona) Added
PassphraseParameters
class. [#1593, #1823] - (Libplanet.Extensions.Cocona) Added
KeyCommand.UnprotectKey(Guid keyId, PassphraseParameters passphrase, bool ignoreStdin = false)
method. [#1593, #1823] - (Libplanet.Net) Added
MessageSendFailedException
class. [#1781, #1786]
Behavioral changes
Block<T>.Transactions
is ordered using a different scheme for evaluation due to protocol version bump. [#1322, #1323, #1518]- (Libplanet.Net)
NetMQTransport.SendMessageWithReplyAsync()
should now complete its process within given timeframetimeout
argument instead of possibly taking longer on some edge cases when waiting for multiple replies. [#1734, #1789] ActionEvaluator<T>.Evaluate()
method became to log message directly instead of other methods that use it. [#1773]- (Libplanet.Net)
NetMQTransport.DoBroadcast
now usesNetMQTransport.SendMessageAsync()
internally instead of usingNetMQ
directly. [#1722, #1824]
Bug fixes
- (Libplanet.Net) Fixed a leak in handling
DealerSocket
s insideNetMQTransport.DoBroadcast()
method. [#1819, #1825]
Dependencies
CLI tools
- All
planet
subcommands taking passphrase now have--passphrase-file
option besides-p
/--passphrase
option to read it from the specified file or standard input (-
) instead. [#1593, #1823] - Fixed a bug where
planet
subcommands taking passphrase had unexpectedly terminated with an uncaughtInvalidOperationException
when it's not associated to any terminal device (tty), i.e., piped. [#1593, #1823] planet mpt diff
command became to output the key and its values in one line as JSON whenever a different key is found, than it outputs all of the different nodes at once. [#1729]
Version 0.27.7
Released on February 18, 2022.
- Fixed
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
method's bug where it had thrownIndexOutOfRangeException
for the input longer or shorter thanHashDigest<T>.Size
on .NET Standard 2.0. [#1706, #1815] - Fixed
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
method's bug where it had returned the wrong digest on .NET Standard 2.0. [#1706, #1815]
Version 0.27.6
Released on February 18, 2022.
- (Libplanet.Net) Fixed a bug where
Swarm<T>.PreloadAsync()
had not thrownOperationCanceledException
even cancellation was requested. [#1547, #1796] - Fixed
ThreadStateException
thrown byNonblockRenderer<T>
andNonblockActionRenderer<T>
classes. [#1772, #1810]
Version 0.27.5
Released on February 16, 2022.
- Upgraded Planetarium.RocksDbSharp from 6.2.4-planetarium to 6.2.6-planetarium. [#1791, #1803]
- (Libplanet.Net) Additional logs tagged
Metric
to monitorITransport
behavior. [#1802]
Version 0.27.4
Released on February 16, 2022.
- Fixed *@planetarium/cli* npm package's bug where installation had not worked since 0.27.0. [#1790, #1799]
- (Libplanet.Net) Return the fixed races between
Swarm<T>
's dual systems for block synchronization (polling and event-driven in parallel) on updating chain by serializing the post-download process which is common for both synchronization mechanisms. [#1731, #1798]
Version 0.27.3
Released on February 11, 2022.
- (Libplanet.Net)
Swarm<T>.CompleteBlockSync()
changed back, reverting the behavior implemented in #1759 to fixed races betweenSwarm<T>
's dual systems for block synchronization (polling and event-driven in parallel) on updating chain [#1797]
Version 0.27.2
Released on February 8, 2022.
- (Libplanet.Net) Sending a
Message
throughNetMQTransport
now fails immediately if theMessage
cannot be queued to aDealerSocket
right away. [#1753, #1778]
Version 0.27.1
Released on February 7, 2022.
- (Libplanet.Net)
Swarm<T>.PreloadAsync()
method became to catch up recent blocks until the local tip is close enough to the topmost tip among peers. [#1775, #1777]
Version 0.27.0
Released on January 26, 2022.
Deprecated APIs
Backward-incompatible API changes
- Moved everything in
Libplanet.Net
namespace from Libplanet assembly to Libplanet.Net assembly. [#1421, #1760] - (Libplanet.Net) Parameters of
NetMQTransport()
constructor has modified. [#1741, #1744]- Removed
RoutingTable table
andint minimumBroadcastTarget
parameters. - Added
TimeSpan? dealerSocketLifetime
parameter.
- Removed
- (Libplanet.Net) Removed
RoutingTable table
andint minimumBroadcastTarget
parameters fromTcpTransport()
constructor. [#1741, #1744] - (Libplanet.Net) Removed
ITransport.BroadcastMessage(Address?, Message)
method. Instead, addedITransport.BroadcastMessage(IEnumerable<BoundPeer>, Message)
method. [#1741, #1744]
Added APIs
- Added
TrieStateStore.CopyStates()
method. [#1653, #1691] - Added
NullBlockPolicy<T>
class. [#1531, #1748] - (Libplanet.Net) Added classes which implements
Message
abstract class. [#1754, #1756]- Added
Ping
class. - Added
Pong
class. - Added
FindNeighbors
class. - Added
Neighbors
class. - Added
DifferentVersion
class.
- Added
Behavioral changes
MerkleTrie.Get()
method now finds multiple states in parallel. [#1743]- (Libplanet.Net)
DealerSocket
s used for broadcasting messages inNetMQTransport
became not to be disposed right after corresponding peer is removed from the routing table. Instead, it will be removed after a certain amount of time. [#1741, #1744] - (Libplanet.Net)
NetMQTransport
no longer attempts to retry failed communications. [#1751, #1752] - (Libplanet.Net) Fixed races between
Swarm<T>
's dual systems for block synchronization (polling and event-driven in parallel) on updating chain by serializing the post-download process which is common for both synchronization mechanisms. [#1731, #1759] - New log output tagged with
Metric
added to measure evaluation time for individualTransaction<T>
s. [#1755, #1758]
Dependencies
- Libplanet.Net assembly is now distributed as a seaprate NuGet package: Libplanet.Net. [#1421, #1760]
CLI tools
- Upgrade node-fetch for *@planetarium/cli* npm package. [CVE-2022-0235, #1747]
Version 0.26.6
Released on February 18, 2022.
- Fixed
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
method's bug where it had thrownIndexOutOfRangeException
for the input longer or shorter thanHashDigest<T>.Size
on .NET Standard 2.0. [#1706, #1815] - Fixed
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
method's bug where it had returned the wrong digest on .NET Standard 2.0. [#1706, #1815]
Version 0.26.5
Released on February 18, 2022.
- Fixed a bug where
Swarm<T>.PreloadAsync()
had not thrownOperationCanceledException
even cancellation was requested. [#1547, #1796] - Fixed
ThreadStateException
thrown byNonblockRenderer<T>
andNonblockActionRenderer<T>
classes. [#1772, #1810]
Version 0.26.4
Released on February 16, 2022.
- Upgraded Planetarium.RocksDbSharp from 6.2.4-planetarium to 6.2.6-planetarium. [#1791, #1803]
- Additional logs tagged
Metric
to monitorITransport
behavior. [#1802]
Version 0.26.3
Released on February 7, 2022.
Swarm<T>.PreloadAsync()
method became to catch up recent blocks until the local tip is close enough to the topmost tip among peers. [#1775]
Version 0.26.2
Released on January 26, 2022.
- Fixed a bug where
ActionEvaluator<T>
's logs had been ignored due to its initialization timings. [#1764] - The elapsed time taking for ordering
Transaction<T>
s before evaluating them are now measured and logged. [#1764] - The time started and finished to calculate state root hashes are now logged. [#1764]
Version 0.26.1
Released on January 20, 2022.
- General logging overhaul in
NetMQTransport<T>
for consistency and readability. [#1735]
Version 0.26.0
Released on January 18, 2022.
Backward-incompatible API changes
- Replaced
IValue StateCompleter<T>(BlockChain<T>, BlockHash, Address)
delegate withIReadOnlyList<IValue?> StateCompleter<T>(BlockChain<T>, BlockHash, IReadOnlyList<Address>)
delegate. [#1703] - Added
IAccountStateDelta.GetStates(IReadOnlyList<Address>)
method. [#1703] - Replaced
IValue AccountStateGetter(Address)
delegate withIReadOnlyList<IValue?> AccountStateGetter(IReadOnlyList<Address>)
delegate. [#1703] - Removed
StateGetter<T>
delegate. [#1703] - Removed
BalanceGetter<T>
delegate. [#1703] - Removed
StateGetter<T> stateGetter
andBalanceGetter<T> balanceGetter
parameters fromActionEvaluator<T>()
constructor. [#1703] - Added
IBlockChainStates<T> blockChainStates
parameter toActionEvaluator<T>()
constructor. [#1703] - Replaced
ITrie.TryGet()
withITrie.Get()
method. [#1703] - Replaced
StateStoreExtensions.GetState()
static method withGetStates()
static method. [#1703] nullable
context enabled forIProtocol
interface andKademlia
,KademliaProtocol
, andRoutingTable
classes. [#1692]RoutingTable.Neighbors(Peer, int, bool)
changed toRoutingTable.Neighbors(BoundPeer, int, bool)
. As a result,RoutingTable
class now only explicitly deals withBoundPeer
s. [#1692]BlockChain<T>.StageTransaction()
,IStagePolicy.Stage()
, andIStagePolicy.Unstage()
now all returnbool
to indicate whether staging was successful or not. [#1710]
Added APIs
- Added
BlockChain<T>.GetStates()
method. [#1703] - Added
IBlockChainStates<T>
interface. [#1703]BlockChain<T>
now implementsIBlockChainStates<T>
.
- Added
StateStoreExtensions.GetStates()
static method. [#1703]
Behavioral changes
- Improved performance of
Swarm<T>.FillBlocksAsync()
's block sync. [#1663, #1699]- The way
Swarm<T>
synchronizes the attachedBlockChain<T>
with peers became more performant by splitting downloading and appending blocks into two parallel tasks.
- The way
Bug fixes
- Fixed a bug where unnecessary additional attempts were made to
unresponsive
Peer
s when discovering aPeer
throughKademliaProtocol
. [#1692]
Version 0.25.5
Released on February 18, 2022.
- Fixed
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
method's bug where it had thrownIndexOutOfRangeException
for the input longer or shorter thanHashDigest<T>.Size
on .NET Standard 2.0. [#1706, #1815] - Fixed
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
method's bug where it had returned the wrong digest on .NET Standard 2.0. [#1706, #1815]
Version 0.25.4
Released on January 18, 2022.
- Some additional logging to track down issues with staging
Transaction<T>
s. [#1718] - (Libplanet.RocksDBStore) Fixed
RocksDBStore
's inaccurate lock handling. [#1719]
Version 0.25.3
Released on January 14, 2022.
- Fixed a bug when message broadcasting on
Swarm<T>
had been stopped suddenly. [#1715]
Version 0.25.2
Released on January 11, 2022.
- Fixed a bug where
TxCompletion<TPeer, TAction>
failed to fetch transactions from other peers. [#1704] - In
TxCompletion<TPeer, TAction>
, instead of maintaining singleRequestTxsFromPeerAsync()
task for each peer, a newRequestTxsFromPeerAsync()
task is spawned every time a new demand is received. [#1704]
Version 0.25.1
Released on January 6, 2022.
Behavioral changes
Swarm<T>
changed back, reverting the behavior implemented in #1606 to append blocks to the canonical chain instead of using a forked chain while syncing recent blocks. [#1693]
Version 0.25.0
Released on January 5, 2022.
Backward-incompatible API changes
- Replaced
HashDigest<T>(ImmutableArray<byte>)
constructor withHashDigest<T>(in ImmutableArray<byte>)
constructor. [#1678] IKeyValueStore
's key type becameKeyBytes
(wasbyte[]
). [#1678]- Replaced
IKeyValueStore.Get(byte[])
method withGet(in KeyBytes)
method. - Replaced
IKeyValueStore.Set(byte[], byte[])
method withSet(in KeyBytes, byte[])
method. - Replaced
IKeyValueStore.Set(IDictionary<byte[], byte[]>)
method withSet(IDictionary<KeyBytes, byte[]>)
method. - Replaced
IKeyValueStore.Delete(byte[])
method withDelete(in KeyBytes)
method. - Replaced
IKeyValueStore.Exists(byte[])
method withExists(in KeyBytes)
method. IKeyValueStore.ListKeys()
method's return type becameIEnumerable<KeyBytes>
(wasIEnumerable<byte[]>
).
- Replaced
ITrie
's key type becameKeyBytes
(wasbyte[]
). [#1689]- Replaced
ITrie.Set(byte[], IValue)
method withSet(in KeyBytes, IValue)
method. - Replaced
ITrie.TryGet(byte[], out IValue?)
method withTryGet(in KeyBytes, out IValue?)
method. - The return type of
MerkleTrieExtensions.ListAllStates()
static method becameIEnumerable<KeyValuePair<KeyBytes, IValue>>
(wasIEnumerable<KeyValuePair<ImmutableArray<byte>, IValue>>
). [#1653]
- Replaced
- Added
IKeyValueStore.Get(IEnumerable<KeyBytes>)
method. [#1678] - Added
IKeyValueStore.Delete(IEnumerable<KeyBytes>)
method. [#1678] nullable
context enabled forPeer
andBoundPeer
classes. All public constructors now explicitly take non-nullable parameters. [#1679]- All publicly accessibe properties of
Peer
andBoundPeer
are now non-nullable except forPeer.PublicIPAddress
.
- All publicly accessibe properties of
- Replaced
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
overloaded static method with other new overloads. [#1680]
Backward-incompatible network protocol changes
- Removed
Sender
property fromMessages.TxIds
andMessages.TxIds
'sMessageType
value bumped to0x31
. [#1681]
Added APIs
- Added
KeyBytes
readonly struct. [#1678] - Added
HashDigest<T>(in ImmutableArray<byte>)
constructor. [#1678] - Added
HashDigest<T>.DeriveFrom(byte[])
overloaded static method. [#1680] - Added
HashDigest<T>.DeriveFrom(ImmutableArray<byte>)
overloaded static method. [#1680] - Added
HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>)
overloaded static method. [#1680] - Added
StateStoreExtensions.EncodeKey()
static method. [#1689] - Added
StateStoreExtensions.DecodeKey()
static method. [#1689]
Behavioral changes
- Improved performance of
Swarm<T>
's block propagation. [#1676] - (Libplanet.RocksDBStore) Improved performance of
RocksDBStore<T>.IterateIndexes()
method. [#1676]
Version 0.24.2
Released on December 24, 2021.
- Fixed a bug of
NonblockRenderer<T>
andNonblockActionRenderer<T>
where they had thrownThreadStateException
when any render events occurred after disposed. [#1682] - Log output compacted by removing duplicate exception messages. [#1632, #1677]
Version 0.24.1
Released on December 16, 2021.
- Fixed a bug where
Transaction<T>
s were unstaged when they were not supposed to. [#1672]
Version 0.24.0
Released on December 16, 2021.
Backward-incompatible API changes
IStagePolicy<T>
'sinterface
methods updated. Notably, allIStagePolicy<T>
now acceptBlockChain<T>
as its parameter. [#1648]Get(BlockChain<T> blockChain, TxId id, bool includeInstaged)
changed toGet(BlockChain<T> blockChain, TxId id, bool filtered = true)
.Iterate()
changed toIterate(BlockChain<T> blockChain, bool filtered = true)
.GetNextTxNonce(Address address, long minedTxs)
changed toGetNextTxNonce(BlockChain<T> blockChain, Address address)
.
Behavioral changes
- Description of
IStagePolicy<T>
and its default implementationVolatileStagePolicy<T>
is overhauled. [#1648]IStagePolicy<T>.Iterate()
no longer guarantees any kind of ordering.IStagePolicy<T>.Ignore()
now also unstages theTransaction<T>
.VolatileStagePolicy<T>
now holds every previously known unconfirmedTransaction<T>
regardless of its staging/unstaging history unless it is expired or ignored.
- New log output tagged with
Metric
added to measure execution time forBlockChain<T>.FindNextHashes()
. [#1669]
Bug fixes
- Fixed a bug where
TxCompletion
had broadcasted invalid transactions. [#1661]
Version 0.23.4
Released on December 24, 2021.
- Fixed a bug of
NonblockRenderer<T>
andNonblockActionRenderer<T>
where they had thrownThreadStateException
when any render events occurred after disposed. [#1682]
Version 0.23.3
Released on December 13, 2021.
- Virtually disabled state fragmentation due to its critical negative impact on action evaluation performance. This will be enabled again after more practical tests in the future releases. [#1665]
Version 0.23.2
Released on December 13, 2021.
- Removed unnecessary a reader lock on
BlockChain<T>.GetState()
method to improve parallelism. [#1657] - Improved performance of
Swarm<T>
's block synchronization. [#1657] - Fixed a bug where
Swarm<T>
had swapped to improper chain. [#1657] - (Libplanet.RocksDBStore) Fixed a bug where
RocksDBStore.ForkBlockIndexes()
had created temporary chains unnecessarily. [#1657]
Version 0.23.1
Released on December 10, 2021.
- Fixed
TrieStateStore.PruneStates()
method's bug that it had thrownArgumentOutOfRangeException
. [#1653, #1654]
Version 0.23.0
Released on December 8, 2021.
From this version Libplanrt can be built on arm64 machines including Apple Silicon (aarch64-apple-darwin).
Added APIs
- Added
PreEvaluationBlock<T>.DetermineStateRootHash(BlockChain<T>, StateCompleterSet<T>, out IImmutableDictionary<string, IValue>)
overloaded method. [#1636] - Added
PreEvaluationBlock<T>.DetermineStateRootHash(IAction?, IStateStore, out IImmutableDictionary<string, IValue>)
overloaded method. [#1636] - Parameter
except
forKBucket.GetRandomPeer()
now defaults tonull
. [#1631] - Added
ArrayEqualityComparer<T>
class. [#1636]
Behavioral changes
- States became to take up much less space than before by reducing unnecessary duplicate data. Although this guarantees the backward compatibility with the existing state store, in order to take complete effect of this optimization, please replay your existing blockchain from the genesis block with the empty store. [#1636]
- (Libplanet.Analyzers) Rule LAA1002 no more warns about enumerating sorted
sets/dictionaries:
System.Collections.Generic.SortedDictionary<TKey, TValue>
System.Collections.Generic.SortedSet<T>
System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>
System.Collections.Immutable.ImmutableSortedSet<T>
Bencodex.Types.Dictionary
(which became to guarantee enumeration order since Bencodex 0.4.0)
Bug fixes
KBucket.Head
andKBucket.Tail
now properly returnnull
if the bucket is empty instead of faulting. [#1631]TxCompletion.Demand()
no longer requestsTransaction<T>
s already in storage. [#1649]
Dependencies
- Upgraded Bencodex from 0.4.0-dev.20211123080042+d7f6c810 to 0.4.0. [#1636]
- Upgraded Planetarium.RocksDbSharp from 6.2.3 to 6.2.4-planetarium. [#1635]
Version 0.22.1
Released on December 5, 2021.
- Compacted log output for convenience. [#1633]
- Removed
ITransport.MessageHistory
property due to memory leak. [#1639]
Version 0.22.0
Released on November 30, 2021.
Backward-incompatible API changes
- Removed
Transaction<T>.BytesLength
property. [#1609] - Removed
Block<T>.BytesLength
property. [#1609] - The types of
BlockChain<T>.MineBlock()
overloaded methods'maxBlockBytes
parameters becamelong?
(wereint?
). [#1609] - The type of
IBlockPolicy<T>.GetMaxBlockBytes(long)
method becamelong
(wasint
). [#1609] - The type of
BlockPolicy<T>()
constructor'sgetMaxBlockBytes
parameter becameFunc<long, long>?
(wasFunc<long, int>?
). [#1609] - The type of
InvalidBlockBytesLengthException()
constructor'sbytesLength
parameter becamelong
(wasint
). [#1609] - The type of
InvalidBlockBytesLengthException.BytesLength
property becamelong
(wasint
). [#1609] - Methods
IsEmpty()
andIsFull()
ofKBucket
changed to propertiesIsEmpty
andIsFull
respectively. [#1610] MessageCodec
class renamed toTcpMessageCodec
. [#1610]lifetime
parameter removed fromIMessageCodec.Decode()
.messageLifespan
parameter added to constructors ofNetMQMessageCodec
andTcpMessageCodec
. [#1610]- Removed unused
PeerStates
property fromSwarm<T>
. [#1610] - Method name
BoundPeer.QueryAppProtocolVersion()
changed toBoundPeer.QueryAppProtocolVersionNetMQ()
. [#1610]
Behavioral changes
Swarm<T>
became to append blocks to forked chain to avoid locking the canonical chain while syncing recent blocks. [#1606]- More streamlined structured logging together with additional logs
tagged as
Metric
. [#1627]
Bug fixes
InvalidMagicCookieException
andInvalidTimestampException
can now be serialized and deserialized. [#1613]- Fixed a bug where
PolymorphicAction<T>
had thrownInvalidCastException
when inner action's.PlainValue
returns other value thanBencodex.Types.Dictionary
. [#1628]
Dependencies
- Libplanet.Stun assembly is now distributed as a seaprate NuGet package: Libplanet.Stun. [#813, #1279, #1625]
- Upgraded Bencodex from 0.3.0 to 0.4.0-dev.20211123080042+d7f6c810. [#1609]
- Now depends on Caching.dll 1.4.0.1.
Version 0.21.2
Released on November 25, 2021.
planet apv query
command became to communicate withNetMQTransport
instead ofTcpTransport
. [#1618]
Version 0.21.1
Released on November 25, 2021.
SwarmOptions.TipLifespan
property' default value was changed. The default lifespan for a tip going stale is now60
seconds instead of30
seconds for the purpose of polling blocks. [#1614]Swarm<T>
's internal logic for determining when theBlockChain<T>.Tip
becomes stale is now fixed. [#1614]
Version 0.21.0
Released on November 16, 2021.
Backward-incompatible API changes
- (Libplanet.RocksDBStore) Removed
MonoRocksDBStore
class. [#1513, #1579] - Removed
rehearsal
parameter fromITrie.Commit()
method. [#1554, #1570] - Removed
rehearsal
parameter fromStateStoreExtensions.Commit()
extension method. [#1554, #1570] - Removed
ITransport.RunAsync()
method.ITransport.StartAsync()
now conducts operation thatITransport.RunAsync()
used to conduct. [#1523] - Removed
ITransport.ReplyMessage()
method which was non-blocking. Instead, addedITransport.ReplyMessageAsync()
asynchronous method which is awaited until the reply message is sent. [#1523] - The type of
ITransport.ProcessMessageHandler
becameAsyncDelegate<T>
(which wasEventHandler
). [#1523] - Removed unused
BlockChain<T>
type parameter fromIStagePolicy<T>.Iterate()
method. [#1553, #1556] - Removed unused
HashAlgorithmTable
class. [#1600] BlockChain<T>.MineBlock()
andBlockChain<T>.GatherTransactionsToMine()
now additionally acceptsmaxBlockBytes
parameter of typeint
. [#1600]- Removed
BlockInsufficientTxsException
andBlockExceedingTransactionsException
classes. [#1504, #1600]
Added APIs
- Added
ITransport.MessageHistory
property. [#1523] - Added
ITransport.WaitForRunning()
method. [#1523] - Added
TcpTransport
class which implementsITransport
interface. [#1523] - Added
SwarmOptions.Type
property. [#1523] - Added
SwarmOptions.TransportType
enum. [#1523] - Added
AsyncDelegate<T>
class. [#1523] - Added
InvalidMagicCookieException
class. [#1523] - Added
MessageCodec
class which inheritsIMessageCodec<T>
. [#1523] - Added
IStagePolicy<T>.GetNextTxNonce()
method. [#1553, #1556] - Added
InvalidBlockBytesLengthException
,InvalidBlockTxCountException
,InvalidBlockHashAlgorithmTypeException
, andInvalidBlockTxCountPerSignerException
classes. [#1504, #1600]
Behavioral changes
- Improved performance of
MerkleTrie.Commit()
andBlockChain<T>.ExecuteActions()
methods. [#1554, #1570] Swarm<T>.MineBlock()
now throwsOperationCanceledException
instead ofBlockInsufficientTxsException
when there are no sufficient number of blocks to mine. [#1600]- Default implementation
BlockPolicy<T>.ValidateNextBlock()
ofIBlockPolicy<T>
now validates the type forBlock<T>.HashAlgorithm
, size forBlock<T>.BytesLength
, and count forBlock<T>.Transactions
. [#1504, #1600]
CLI tools
planet stats
command's-p
/--path
option no more supports the store typemonorocksdb
. [#1513, #1579]- Subcommands under
planet store
no more supports the store typemonorocksdb
. [#1513, #1579]
Version 0.20.2
Released on November 9, 2021.
- (Libplnaet.RocksDBStore) Fixed
DefaultStore.ForkBlockIndexes()
method's bug that it had been thrownChainIdNotFoundException
when received a chain forked from already deleted. [#1591, #1592] - Fixed improper implementations of
BlockExceedingTransactionsException
InvalidBlockBytesLengthException
in regards to serialization and related tests. [#1594]
Version 0.20.1
Released on November 8, 2021.
Swarm<T>
became to broadcast a new block to peers immediately afterSwarm<T>.BlockChain
'sTip
changes while it isRunning
. [#1582, #1586]
Version 0.20.0
Released on November 3, 2021.
Deprecated APIs
- (Libplanet.RocksDBStore)
MonoRocksDBStore
will be gone in the next minor release: 0.21.0. [#1513, #1574]
Backward-incompatible API changes
Added APIs
Version 0.19.3
Released on November 8, 2021.
Swarm<T>
became to broadcast a new block to peers immediately afterSwarm<T>.BlockChain
'sTip
changes while it isRunning
. [#1582]
Version 0.19.2
Released on November 3, 2021.
PrivateKey(IReadOnlyList<byte>)
overloaded constructor no more accepts a list shorter or longer than 32 bytes. [#1571, #1572]PrivateKey.FromString()
method no more accept a hexadecimal digits shorter or longer than 64 characters. [#1571, #1572]- Fixed a bug where
HashAlgorithmType.Digest(byte[])
andHashAlgorithmType.Digest(ImmutableArray<byte>)
methods had returned a wrong hash digest afterHashAlgorithmType.Digest(IEnumerable<byte[]>)
orHashAlgorithmType.Digest(IEnumerable<ImmutableArray<byte>>)
methods had been once called. [#1575, #1576]
Version 0.19.1
Released on October 29, 2021.
BlockMetadata.MineNonce()
method and other mining methods based on it now do not spawn a new thread if theworkers
is less than 2. [#1564]BlockMetadata.MineNonce()
method and other mining methods based on it now uses the half of the present logical processors (i.e.,Environment.ProcessorCount / 2
) by default. If there is only one logical processor, uses one worker. [#1564]- Rolled back the order of the header of a
Message
so that it is compatible with nodes based on Libplanet pre-0.19.0. [#1565]
Version 0.19.0
Released on October 27, 2021.
Backward-incompatible API changes
- Removed
IStore.StageTransactionIds()
method. [#1166, #1535] - Removed
IStore.UnstageTransactionIds()
method. [#1166, #1535] - Removed
IStore.IterateStagedTransactionIds()
method. [#1166, #1535] - Removed
Message.ToNetMQMessage()
method. UseIMessageCodec<T>.Encode()
method instead. [#1503] - Removed
Message.Parse()
static method. UseIMessageCodec<T>.Decode()
method instead. [#1503] - Removed unused
HashAlgorithmGetter
type parameter fromActionEvaluator<T>()
constructor. [#1537] Hashcash.Answer()
method became to take randomseed
value explicitly. [#1546]
Backward-incompatible network protocol changes
- The order of the header of a
Message
has been modified. [#1503]
Added APIs
- Added
BlockMetadata.MineNonce(HashAlgorithmType, int, CancellationToken)
overloaded method. [#1546] - Added
Message.MessageFrame
enum. [#1503] - Added
Message.Type
property. [#1503] - Added
Message.DataFrames
property. [#1503] - Added
IMessageCodec<T>
interface. [#1503] - Added
NetMQMessageCodec
class which inheritsIMessageCodec<T>
. [#1503] - Added
MemoryStore
class. [#1544] - Added
MemoryKeyValueStore
class. [#1544] - Added
BlockDemandTable.Remove()
method. [#1549] - Added
BlockMetadata.MineNonce(HashAlgorithmType, int, CancellationToken)
overloaded method. [#1546] - Added
SwarmOptions.TipLifespan
property. [#1557]
Behavioral changes
BlockMetadata.MineNonce()
method became to use multithreading when looking for the nonce. [#1546]IStore.ForkTxNonces()
method became to throwChainIdNotFoundException
when a givensourceChainId
does not exist. [#1544]Swarm<T>.StartAsync()
method became to poll neighbor peers if they have any new blocks whetherSwarm<T>.BlockDemandTable
is empty or not. The polling is triggered whenSwarm<T>.BlockChain
'sTip
has been unchanged for a while. Expiration time for tips can be configured throughSwarmOptions.TipLifespan
property. [#1557]
Bug fixes
- Fixed
DefaultStore.ForkBlockIndexes()
method's bug that it had done silently no-op when a givensourceChainId
had not existed, which had not been compliant withIStore.ForkBlockIndexes()
method's specification. [#1544] - Fixed
Swarm<T>
's bug that it had thrownPingTimeoutException
if any peer in configuredSwarmOptions.StaticPeers
is unreachable. [#1550, #1551] - (Libplanet.RocksDBStore) Fixed
RocksDBStore.ForkBlockIndexes()
method's bug that it had done silently no-op when a givensourceChainId
had not existed, which had not been compliant withIStore.ForkBlockIndexes()
method's specification. [#1544] - (Libplanet.RocksDBStore) Fixed
MonoRocksDBStore.ForkBlockIndexes()
method's bug that it had done silently no-op when a givensourceChainId
had not existed, which had not been compliant withIStore.ForkBlockIndexes()
method's specification. [#1544] - Fixed a bug where
Swarm<T>
did not removed failed block demands from theBlockDemandTable
. [#1549]
Version 0.18.5
Released on November 3, 2021.
- Fixed a bug where
HashAlgorithmType.Digest(byte[])
andHashAlgorithmType.Digest(ImmutableArray<byte>)
methods had returned a wrong hash digest afterHashAlgorithmType.Digest(IEnumerable<byte[]>)
orHashAlgorithmType.Digest(IEnumerable<ImmutableArray<byte>>)
methods had been once called. [#1575]
Version 0.18.4
Released on November 2, 2021.
PrivateKey(IReadOnlyList<byte>)
overloaded constructor no more accepts a list shorter or longer than 32 bytes. [#1571]PrivateKey.FromString()
method no more accept a hexadecimal digits shorter or longer than 64 characters. [#1571]
Version 0.18.3
Released on October 28, 2021. Mainly backported critical bug fixes from 0.19.0. [#1562]
Swarm<T>.StartAsync()
method became to poll neighbor peers if they have any new blocks whetherSwarm<T>.BlockDemandTable
is empty or not. The polling is triggered whenSwarm<T>.BlockChain
'sTip
has been unchanged for a while. [#1557]- Fixed
Swarm<T>
's bug that it had thrownPingTimeoutException
if any peer in configuredSwarmOptions.StaticPeers
is unreachable. [#1550, #1551] - Fixed a bug where
Swarm<T>
did not removed failed block demands from theBlockDemandTable
. [#1549]
Version 0.18.2
Released on October 22, 2021.
- Fixed a bug that
Swarm<T>
had not responded toGetBlocks
requests when some of requested blocks fail to be loaded. It now sends aBlocks
response with successfully loaded blocks for the same situation. [#1540]
Version 0.18.1
Released on October 21, 2021.
- Fixed a bug where
PublicKey.Verify()
method had thrown exceptions for some invalid inputs. [#1520] BaseStore.GetBlock<T>()
method now throwsInvalidOperationException
when it fails to load a requested block's transactions. [#1500, #1532]- (Libplanet.RocksDBStore) Operations on
RocksDBStore
that update data no longer suppress the internal failures. [#1500, #1532]
Version 0.18.0
Released on October 13, 2021.
Backward-incompatible API changes
Hashcash.Stamp(Nonce)
delegate's return type becameIEnumerable<byte[]>
(wasbyte[]
). [#1492]- Moved
BlockDigest
struct toLibplanet.Store
namespace (fromLibplanet.Blocks
namespace). [#1492] - Removed
Block<T>.ToBlockDigest()
method. UseBlockDigest.FromBlock<T>()
static method instead. [#1492] ActionEvaluator<T>.Evaluate()
method'sblock
parameter became to takeIPreEvaluationBlock<T>
(wasIBlock<T>
). [#1146, #1164, #1492]Block<T>
andBlockHeader
now guarantees that their every instance has integrity. [#1164, #1492]Block<T>
became unable to be subclassed.- Remove
Block<T>(long, long, BigInteger, Nonce, Address, BlockHash?, DateTimeOffset, IReadOnlyList<Transaction<T>>, HashAlgorithmType, HashDigest<SHA256>, ImmutableArray<byte>?, int)
overloaded constructor. Use other overloaded constructors instead. - Added
Block<T>(IBlockHeader header, IEnumerable<Transaction<T>>)
overloaded constructor. - Added
Block<T>(PreEvaluationBlock<T>, HashDigest<SHA256>, ImmutableArray<byte>?)
overloaded constructor. [#1457, #1507] BlockHeader
is no more readonly struct, but a sealed class.- Removed
BlockHeader(int, long, string, ImmutableArray<byte>, ImmutableArray<byte>, long, BigInteger, ImmutableArray<byte>, ImmutableArray<byte>, ImmutableArray<byte>, ImmutableArray<byte>, ImmutableArray<byte>)
constructor. Use other overloaded constructors instead. - Added
BlockHeader(PreEvaluationBlockHeader, HashDigest<SHA256>, ImmutableArray<byte>?)
overloaded constructor. [#1457, #1507] - Added
BlockHeader(PreEvaluationBlockHeader, HashDigest<SHA256>, ImmutableArray<byte>?, BlockHash)
overloaded constructor. [#1457, #1507]
Block<T>
andBlockHeader
have no more marshaling/unmarshalling methods.- Removed
Block<T>(Bencodex.Types.Dictionary)
overloaded constructor. UseBlockMarshaler.UnmarshalBlock()
static method instead. - Removed
Block<T>.Deserialize()
static method. Instead, useBlockMarshaler.UnmarshalBlock()
static method andBencodex.Codec
together. - Removed
Block<T>.ToBencodex()
method. UseBlockMarshaler.MarshalBlock()
static method instead. - Removed
Block<T>.Serialize()
method. Instead, useBlockMarshaler.MarshalBlock()
static method andBencodex.Codec
together. - Removed
BlockHeader(Bencodex.Types.Dictionary)
overloaded constructor. UseBlockMarshaler.UnmarshalBlockHeader()
static method instead. - Removed
BlockHeader.Deserialize()
static method. Instead, useBlockMarshaler.UnmarshalBlockHeader()
static method andBencodex.Codec
together. - Removed
BlockHeader.ToBencodex()
method. UseBlockMarshaler.MarshalBlockHeader()
static method instead. - Removed
BlockHeader.Serialize()
method. Instead, useBlockMarshaler.MarshalBlockHeader()
static method andBencodex.Codec
together.
- Removed
Block<T>
andBlockHeader
now guarantee that their every instance has itsStateRootHash
. [#1128, #1146, #1492]Block<T>.StateRootHash
property's type becameHashDigest<SHA256>
(wasHashDigest<SHA256>?
).- Removed
Block<T>(Block<T>, HashDigest<SHA256>)
overloaded constructor. UseBlock<T>(PreEvaluationBlock<T>, HashDigest<SHA256>)
overloaded constructor instead. - Removed
Block<T>.Mine()
static method. UseBlockContent<T>.Mine()
andPreEvaluationBlock<T>.Evaluate()
methods instead. BlockHeader.StateRootHash
property's type becameHashDigest<SHA256>
(wasHashDigest<SHA256>?
).- The type of
InvalidBlockStateRootHashException()
constructor'sexpectedStateRootHash
parameter becameHashDigest<SHA256>
(wasHashDigest<SHA256>?
). [#1507] InvalidBlockStateRootHashException.ExpectedStateRootHash
property's type becameHashDigest<SHA256>
(wasHashDigest<SHA256>?
). [#1507]
Block<T>
andBlockHeader
became aware ofHashAlgorithmType
used for proof-of-work mining. [#1492]- Added
Block<T>.HashAlgorithm
property. - Added
BlockHeader.HashAlgorithm
property. - Removed
BlockHeader(int, long, DateTimeOffset, Nonce, Address, long, BigInteger, BlockHash?, HashDigest<SHA256>?, BlockHash, ImmutableArray<byte>, HashDigest<SHA256>?)
constructor. UseBlockHeader(int, long, DateTimeOffset, Nonce, Address, long, BigInteger, BlockHash?, HashDigest<SHA256>?, BlockHash, ImmutableArray<byte>, HashDigest<SHA256>, HashAlgorithmType)
constructor instead. - Added
HashAlgorithmGetter hashAlgorithmGetter
parameter toIStore.GetBlock<T>()
method. - Removed
BlockDigest.Header
property. UseBlockDigest.GetHeader()
method instead. - Added
BlockDigest.GetHeader()
method. - Added
HashAlgorithmGetter hashAlgorithmGetter
parameter toDelayedRenderer<T>()
constructor. - Added
HashAlgorithmGetter hashAlgorithmGetter
parameter toDelayedActionRenderer<T>()
constructor. - Added
DelayedRenderer<T>.HashAlgorithmGetter
property.
- Added
- Blocks became signed by the miner since the protocol version 2.
[#1457, #1507]
- Added
Block<T>(PreEvaluationBlock<T>, HashDigest<SHA256>, ImmutableArray<byte>?)
overloaded constructor. [#1164, #1492] - Added
BlockHeader(PreEvaluationBlockHeader, HashDigest<SHA256>, ImmutableArray<byte>?)
overloaded constructor. [#1164, #1492] - Added
BlockHeader(PreEvaluationBlockHeader, HashDigest<SHA256>, ImmutableArray<byte>?, BlockHash)
overloaded constructor. [#1164, #1492] - Added
Block<T>.Signature
property. - Added
Block<T>.PublicKey
property. - Added
BlockHeader.Signature
property. - Added
BlockHeader.PublicKey
property. - Added
InvalidBlockPublicKeyException
class. - Added
InvalidBlockSignatureException
class.
- Added
IStateStore
now requires implementations to be trie. [#1128, #1146, #1492]- Added
IStateStore.GetStateRoot()
method. - Added
IStateStore.PruneStates()
method. - Removed
IStateStore.SetStates<T>()
method. - Removed
IStateStore.GetState()
method. - Removed
IStateStore.ContainsBlockStates()
method. - Removed
IStateStore.ForkStates<T>()
method.
- Added
TrieStateStore
no more stores associations betweenBlock<T>.Hash
/Block<T>.PreEvaluationHash
andBlock<T>.StateRootHash
, becauseBlock<T>.StateRootHash
became mandatory. [#1128, #1146, #1492]- Added
ITrie.Recorded
property. - Removed
IKeyValueStore stateHashKeyValueStore
parameter fromTrieStateStore()
constructor. - Removed
TrieStateStore.GetTrie()
method. - Removed
TrieStateStore.GetRootHash()
method. - Replaced
TrieStateStore.PruneStates(IImmutableSet<BlockHash>)
method withTrieStateStore.PruneStates(IImmutableSet<HashDigest<SHA256>>)
method.
- Added
- The types of
BlockChain<T>.MineBlock()
overloaded methods'miner
parameter becamePrivateKey
(wereAddress
). [#1457, #1507]
Backward-incompatible network protocol changes
- The
Block<T>.CurrentProtocolVersion
is bumped from 1 to 2: [#1507]- Block's total difficulty value became included to the input of block hashes and pre-evaluation hashes since the protocol version 2.
- Blocks became to have miner's public key as well since the protocol version 2. [#1457]
- Blocks became to have no miner's address since the protocol version 2, because it can be derived from miner's public key. [#1457]
- Blocks became to have a signature made using miner's private key since the protocol version 2. Block signatures affect block hashes. [#1457]
Added APIs
- Added
BlockMetadata
class. [#1164, #1457, #1492, #1507] - Added
BlockContent<T>
class. [#1164, #1492] - Added
PreEvaluationBlockHeader
class. [#1146, #1164, #1457, #1492, #1507] - Added
PreEvaluationBlock<T>
class. [#1146, #1164, #1457, #1492, #1507] - Added
BlockDigest.FromBlock<T>()
static method. [#1492] - Added
Block<T>(PreEvaluationBlock<T>, HashDigest<SHA256>)
overloaded constructor. [#1146, #1164, #1492] - Added
Block<T>.HashAlgorithm
property. [#1492] - Added
Block<T>.PublicKey
property. [#1457, #1507] - Added
Block<T>.Signature
property. [#1457, #1507] - Added
Block<T>(PreEvaluationBlock<T>, HashDigest<SHA256>, ImmutableArray<byte>?)
overloaded constructor. [#1164, #1457, #1492, #1507] - Added
Block<T>(IBlockHeader, IEnumerable<Transaction<T>>)
overloaded constructor. [#1164, #1492] - Added
BlockHeader.HashAlgorithm
property. [#1492] - Added
BlockHeader.PublicKey
property. [#1457, #1507] - Added
BlockHeader.Signature
property. [#1457, #1507] - Added
BlockHeader(PreEvaluationBlockHeader, HashDigest<SHA256>, ImmutableArray<byte>?)
overloaded constructor. [#1164, #1457, #1492, #1507] - Added
BlockHeader(PreEvaluationBlockHeader, HashDigest<SHA256>, ImmutableArray<byte>?, BlockHash)
overloaded constructor. [#1164, #1457, #1492, #1507] - Added
IBlockMetadata
interface. [#1164, #1457, #1492, #1507]Block<T>
became to implementIBlockMetadata
interface.BlockHeader
became to implementIBlockMetadata
interface.BlockMetadata
became to implementIBlockMetadata
interface.BlockContent<T>
became to implementIBlockMetadata
interface.PreEvaluationBlockHeader
became to implementIBlockMetadata
interface.PreEvaluationBlock<T>
became to implementIBlockMetadata
interface.BlockDigest
became to implementIBlockMetadata
interface.
- Added
IBlockContent<T>
interface. [#1164, #1492]Block<T>
became to implementIBlockContent<T>
interface.BlockContent<T>
became to implementIBlockContent<T>
interface.PreEvaluationBlock<T>
became to implementIBlockContent<T>
interface.
- Added
IPreEvaluationBlockHeader
interface. [#1164, #1492]Block<T>
became to implementIPreEvaluationBlockHeader
interface.BlockHeader
became to implementIPreEvaluationBlockHeader
interface.PreEvaluationBlockHeader
became to implementIPreEvaluationBlockHeader
interface.PreEvaluationBlock<T>
became to implementIPreEvaluationBlockHeader
interface.
- Added
IPreEvaluationBlock<T>
interface. [#1164, #1492]Block<T>
became to implementIPreEvaluationBlock<T>
interface.PreEvaluationBlock<T>
became to implementIPreEvaluationBlock<T>
interface.ActionEvaluator<T>.Evaluate()
method'sblock
parameter became to takeIPreEvaluationBlock<T>
(wasIBlock<T>
).
- Added
IBlockHeader
interface. [#1146, #1164, #1492]Block<T>
became to implementIBlockHeader
interface.BlockHeader
became to implementBlockHeader
interface.
- Added
BlockMetadataExtensions
static class. [#1164, #1492] - Added
BlockContentExtensions
static class. [#1164, #1492] - Added
BlockMarshaler
static class. [#1164, #1492] - Added
BlockDigest.GetHeader()
method. [#1492] - Added
StateStoreExtensions
static class. [#1128, #1146, #1492] - Added
StoreExtensions.GetStateRootHash()
extension method. [#1128, #1146, #1492] - Added
DelayedRenderer<T>.HashAlgorithmGetter
property. [#1492] BlockDigest
became to implementIBlockExcerpt
. [#1492]- Added
InvalidBlockPublicKeyException
class. [#1457, #1507] - Added
InvalidBlockSignatureException
class. [#1457, #1507]
Behavioral changes
Block<T>.Transactions
property is now ordered byTransaction<T>.Id
so that it's consistent withIBlockContent<T>
's other implementations. As this behavior can be changed in the later releases, do not depend on its ordering, but explicitly sort them before use when the order needs to b guaranteed. [#1492]- Blocks and block metadata became to have their miners' public keys too.
Although it is backward compatible to the earlier protocol version than 2,
blocks with the protocol version 2 or later must have public keys.
If a block lacks public key,
InvalidBlockPublicKeyException
is thrown. [#1457, #1507] PublicKey.ToString()
method now returns its hexadecimal representation in compressed form. [#1507]
Bug fixes
- Fixed
NullReferenceException
thatPublicKey.Verify()
method had thrown with a non-null emptysignature
. [#1507] - Fixed
TxExecution
not updating during preload. [#1508, #1509]
Version 0.17.0
Released on September 28, 2021.
Backward-incompatible API changes
- Added
StateCompleterSet<T>.ComplementAll
property. [#1358, #1386] - Added
StateCompleterSet<T>.ComplementLatest
property. [#1358, #1386] BlockPerception
now implementsIBlockExcerpt
interface. [#1440]BlockPerception.Excerpt
property removed.
TotalDifficultyComparer
now implementsIComparer<IBlockExcerpt>
interface. [#1442]- Return type for
BlockDemandTable.Add()
is nowvoid
. [#1435, #1443] - Added
BlockInsufficientTxsException
. [#1445] PrivateKey()
constructor's parameter type becameIReadOnlyList<byte>
(wasbyte[]
). [#1464]PrivateKey.ByteArray
property's type becameImmutableArray<byte>
(wasbyte[]
). To get a mutable one, usePrivateKey.ToByteArray()
method instead. [#1464]PublicKey()
constructor's parameter type becameIReadOnlyList<byte>
(wasbyte[]
). [#1464]PublicKey.Verify()
method's both parameter types becameIReadOnlyList<byte>
(were bothbyte[]
). [#1464]HashDigest<T>.DeriveFrom()
method's parameter type becameIReadOnlyList<byte>
(wasbyte[]
). [#1464]IBlockPolicy<T>.GetMaxBlockBytes()
description changed for0
and negative values. [#1449, #1463]- Returned values from these will now be taken literally
by
BlockChain<T>
.
- Returned values from these will now be taken literally
by
- Removed
IBlockPolicy<T>.MaxTransactionsPerBlock
property. It is replaced byIBlockPolicy<T>.GetMaxTransactionsPerBlock(long index)
method. [#1447] - Added
IBlockPolicy<T>.GetMaxTransactionsPerBlock(long index)
method. [#1447] - Added
IBlockPolicy<T>.GetMinTransactionsPerBlock(long index)
method. [#1479] - Added
IBlockPolicy<T>.GetMaxTransactionsPerSignerPerBlock(long index)
method. [#1449, #1463] - Unused parameter
currentTime
removed fromBlockChain<T>.Append()
. [#1462, #1465] - Added an optional
maxTransactionsPerSigner
parameter toBlockChain<T>.MineBlock()
method. [#1449, #1463] - Added an optional
txPriority
parameter toBlockChain<T>.MineBlock()
method. [#1477] BlockHeader
's properties are now represented as richer types than before. [#1470]BlockHeader.Timestamp
property's type becameDateTimeOffset
(wasstring
).BlockHeader.Nonce
property's type becameNonce
(wasImmutableArray<byte>
).BlockHeader.Miner
property's type becameAddress
(wasImmutableArray<byte>
).BlockHeader.PreviousHash
property's type becameBlockHash?
(wasImmutableArray<byte>
).BlockHeader.TxHash
property's type becameHashDigest<SHA256>?
(wasImmutableArray<byte>
).BlockHeader.Hash
property's type becameBlockHash
(wasImmutableArray<byte>
).BlockHeader.StateRootHash
property's type becameHashDigest<SHA256>?
(wasImmutableArray<byte>
).- Removed
BlockHeader(int, long, string, ImmutableArray<byte>, ImmutableArray<byte>, long, BigInteger, ImmutableArray<byte>, ImmutableArray<byte>, ImmutableArray<byte>, ImmutableArray<byte>, ImmutableArray<byte>)
constructor. UseBlockHeader(int, long, DateTimeOffset, Nonce, Address, long, BigInteger, BlockHash?, HashDigest<SHA256>?, BlockHash, ImmutableArray<byte>, HashDigest<SHA256>?)
constructor instead.
IStore
,IStateStore
, andIKeyValueStore
interfaces now inheritIDisposable
. [#1448, #1474]- Multiple changes for
IBlockPolicy<T>
interface. [#1485]bool DoesTransactionFollowsPolicy(BlockChain<T>, Transaction<T>)
changed toTxPolicyViolationException? ValidateNextBlockTx( BlockChain<T>, Transaction<T>)
.InvalidBlockException ValidateNextBlock(BlockChain<T>, Block<T>)
changed toBlockPolicyViolationException? ValidateNextBlock( BlockChain<T>, Block<T>)
.BlockPolicy<T>
, the default implementation forIBlockPolicy<T>
, has been updated accordingly.
- Removed
BlockPolicy<T>()
constructor withint blockIntervalMilliseconds
parameter. Use the one withTimeSpan? blockInterval
instead. [#1485] - Replaced
int maxBlockBytes
andint maxGenesisBytes
parameters fromBlockPolicy<T>()
constructor withFunc<long, int>? getMaxBlockBytes
. [#1485] - Removed
TxViolatingBlockPolicyException
class. [#1485] - Optional parameter name
difficultyBoundDivisor
forBlockPolicy<T>()
constructor changed todifficultyStability
. [#1495] - Type for optional parameter
difficultyStability
forBlockPolicy<T>()
constructor changed tolong?
fromint?
. [#1495]
Backward-incompatible network protocol changes
Message
became to serialize peer with Bencodex instead ofBinaryFormatter
. [#1455]
Added APIs
IBlockExcerpt.ExcerptEquals
extension method added. [#1440]- Added
PrivateKey.FromString()
method. [#1475] - Added
PrivateKey.Sign(ImmutableArray<byte>)
overloaded method. [#1464] - Added
PrivateKey.Decrypt(ImmutableArray<byte>)
overloaded method. [#1464] - Added
PrivateKey.ToByteArray()
method. [#1464] - Added
PublicKey.Encrypt(ImmutableArray<byte>)
overloaded method. [#1464] - Added
PublicKey.ToImmutableArray()
method. [#1464] - Added
Nonce(ImmutableArray<byte>)
overloaded constructor. [#1464] - Added
HashAlgorithmType.Digest(IEnumerable<byte[]>)
overloaded method. [#1480] - Added
HashAlgorithmType.Digest(IEnumerable<ImmutableArray<byte>>)
overloaded method. [#1480] - Added
BlockHeader(int, long, DateTimeOffset, Nonce, Address, long, BigInteger, BlockHash?, HashDigest<SHA256>?, BlockHash, ImmutableArray<byte>, HashDigest<SHA256>?)
constructor. [#1470] - Added
TxCompletion<TPeer, TAction>
class. [#1420, #1478] - Added
BlockPolicyViolationException
andTxPolicyViolationException
classes. [#1485] - Added
DifficultyAdjustment
static class. [#1495] - Added
BlockPolicy<T>.DifficultyStability
andBlockPolicy<T>.MinimumDifficulty
properties. [#1495]
Behavioral changes
StateCompleterSet<T>.Recalculate
now evaluates states even for those already inIStateStore
. Moreover, it also terminates early if possible after reaching theBlockHash
provided with a call. [#1358, #1386]TotalDifficultyComparer
no longer considers perceived time when comparingIBlockExcerpt
s. [#1442]- General logic for determining the canonical chain has been updated.
[#1435, #1443]
- Perceived time is only used for marking a received header in
BlockDemandTable
in order to decide whetherBlockDemand
is stale or not. This should prevent a tip regression for a local node, as the tip of a chain is never considered as stale.
- Perceived time is only used for marking a received header in
- Block sync using
BlockDemand
became not to fill blocks from multiple peers. [#1459] BlockChain<T>.MineBlock()
now usesmaxTransactions
literally. [#1449, #1463]- Before,
maxTransactions
were internally automatically set to a value between1
andBlockChain<T>.Policy.MaxTransactionsPerBlock
.
- Before,
- Similarly,
BlockChain<T>.MineBlock()
now internally usesBlockChain<T>.Policy.GetMaxBlockBytes()
literally. [#1449, #1463] NetMQTransport
became to no more send CreatePermission to TURN client and require permission-less TURN server. See coturn's relevant configuration as well. [#1423]Swarm<T>
became to sync transactions from multiple peers at the same time. [#1420, #1478]
Bug fixes
- Improper sanity checks for
targetBlockInterval
(changed from the old nameblockInterval
),minimumDifficulty
, anddifficultyStability
(changed from the old namedifficultyBoundDivisor
) arguments given toBlockPolicy<T>()
constructor fixed. [#1495]- It was possible for
targetBlockInterval
to be zero, which would result in division by zero, when this makes no sense. - It was possible for
difficultyStability
not to be positive when this makes no sense. - Wrongly threw an
ArgumentOutOfRangeException
for the case whereminimumDifficulty
would equaldifficultyStability
. - It was possible for
minimumDifficulty
to be zero, which would allow difficulty to be stuck at zero indefinitely, when this does not make sense.
- It was possible for
Version 0.16.0
Released on August 25, 2021.
Backward-incompatible API changes
- Removed
Swarm<T>.BlockDemand
property. [#1419, #1425] BlockChain<T>.Tip
property is now non-nullable. [#1430]
Added APIs
- Added
BlockDemandTable<T>
class. [#1419, #1425] - Added
Swarm<T>.BlockDemandTable
property. [#1419, #1425] - Added
SwarmOptions.PollInterval
property. [#1419, #1425] - Added
SwarmOptions.MaximumPollPeers
property. [#1419, #1425]
Behavioral changes
Bug fixes
- Fixed a bug where
Swarm<T>.PreloadAsync()
failed to sync blocks from the peer that has chain with higher difficulty, but lower index. [#1419, #1425]
Version 0.15.4
Released on September 14, 2021.
- Fixed a bug where
BlockChain<T>.MineBlock()
had created a block that includes both transactions when there are two or more transactions with the same nonce on the stage. [#1491]
Version 0.15.3
Released on September 10, 2021.
- Fixed a bug where
Swarm<T>
fails to reply transaction when any of the requested transactions id inGetTxs
message does not exist in the storage. [#1481]
Version 0.15.2
Released on September 3, 2021.
- Removed
ITransport.SendMessageWithReplyAsync(BoundPeer, Message, TimeSpan?, int, CancellationToken)
method. Instead, addedITransport.SendMessageWithReplyAsync(BoundPeer, Message, TimeSpan?, int, bool, CancellationToken)
method. [#1458, #1461] - Fixed a bug where
GetTxs
request failed to receive transactions if any messages are missing. [#1458, #1461]
Version 0.15.1
Released on August 28, 2021.
NetMQTransport
became to process message in non blocking way. [#1451]
Version 0.15.0
Released on August 18, 2021.
Backward-incompatible API changes
- Added
IRandom.Seed
property. [#1431]
Version 0.14.1
Released on August 18, 2021.
- Added additional tags to logging. [#1433]
Version 0.14.0
Released on Aug 5, 2021.
Added APIs
- Added
NonblockRenderer<T>
class. [#1402, #1422] - Added
NonblockActionRenderer<T>
class. [#1402, #1422]
Version 0.13.2
Released on Aug 5, 2021.
- When a reorg happens,
Swarm<T>
now broadcasts a reorged chain tip first before rendering. [#1385, #1415] - Fixed a bug where
TurnClient
hadn't been recovered when TURN connection had been disconnected. [#1424]
Version 0.13.1
Released on July 29, 2021.
- Fixed
HashAlgorithmType.Digest()
method's bug that it returns an incorrect digest bytes when it is called by multiple threads at a time. [#1411]
Version 0.13.0
Released on July 28, 2021.
Backward-incompatible API changes
- Added
bool render = false
option toSwarm<T>.PreloadAsync()
. Blocks and actions in preloaded blocks will be rendered if the switch is set totrue
. [#1391]
Added APIs
- Added
Transaction<T>.CreateUnsigned()
method. [#1378] - Added
SwarmOptions.TableSize
property. [#1401] - Added
SwarmOptions.BucketSize
property. [#1401]
Behavioral changes
Transaction<T>.Validate()
became to throwInvalidTxSignatureException
if the transaction was not signed. [#1378]
Bug fixes
- Fixed a bug where
Swarm<T>
had stopped whenObjectDisposedException
is thrown duringNetMQTransport.DoBroadcast()
. [#1362, #1365]
Version 0.12.1
Released on July 28, 2021.
Swarm<T>.PreloadAsync()
now checks the existence of blocks in the storage (was in the blockchain). [#1324]
Version 0.12.0
Released on July 23, 2021.
Backward-incompatible API changes
- Block hashes are now represented as
BlockHash
, which was introduced in this release, which has been done asHashDigest<SHA256>
. [#1192, #1197]- The type of
Block<T>.Hash
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
Block<T>.PreviousHash
property becameBlockHash?
(wasHashDigest<SHA256>?
). - The types of
Block<T>()
constructors'hash
parameter becameBlockHash
(wereHashDigest<SHA256>
). - The types of
Block<T>()
constructors'previousHash
parameter becameBlockHash?
(wereHashDigest<SHA256>?
). - The type of
Block<T>.Mine()
method'spreviousHash
parameter becameBlockHash?
(wasHashDigest<SHA256>?
). - The return type of
HashCash.Hash()
method becameBlockHash
(wasHashDigest<SHA256>
). - The type of
Transaction<T>()
constructor'sgenesisHash
parameter becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
Transaction<T>.Create()
method'sgenesisHash
parameter becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
Transaction<T>.GenesisHash
property becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
Transaction<T>.EvaluateActionsGradually()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
Transaction<T>.EvaluateActions()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
BlockChain[]
indexer's parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
BlockChain.BlockHashes
property becameIEnumerable<BlockHash>
(wasIEnumerable<HashDigest<SHA256>>
). - The type of
BlockChain.ContainsBlock()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
BlockChain.GetState()
method'soffset
parameter becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
BlockChain.GetBalance()
method'soffset
parameter becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
StateCompleter<T>
delegate'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
FungibleAssetStateCompleter<T>
delegate'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). BlockSet<T>
no more implementsIDictionary<HashDigest<SHA256>, Block<T>>
, but now implementsIDictionary<BlockHash, Block<T>>
.- The type of
ActionExecutionState.ExecutedBlockHash
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
BlockDownloadState.ReceivedBlockHash
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
BlockVerificationState.VerifiedBlockHash
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IncompleteBlockStatesException()
constructor'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IncompleteBlockStatesException.BlockHash
property becameBlockHash
(wasHashDigest<SHA256>
). - The types of
InvalidGenesisBlockException()
constructor'snetworkExpected
andstored
parameters becameBlockHash
(wereHashDigest<SHA256>
). - The type of
InvalidGenesisBlockException.NetworkExpected
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
InvalidGenesisBlockException.Stored
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
InvalidTxGenesisHashException()
constructor'sexpectedGenesisHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
InvalidTxGenesisHashException()
constructor'simproperGenesisHash
parameter becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
InvalidTxGenesisHashException.ExpectedGenesisHash
property becameBlockHash
(wasHashDigest<SHA256>
). - The type of
InvalidTxGenesisHashException.ImproperGenesisHash
property becameBlockHash?
(wasHashDigest<SHA256>?
). - The return type of
IStore.IndexBlockHash()
method becameBlockHash?
(wasHashDigest<SHA256>?
). - The type of
IStore.AppendIndex()
method'shash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - Replaced
IStore.ForkBlockIndexes()
method'sHashDigest<SHA256> branchPoint
parameter withBlockHash branchpoint
. - The return type of
IStore.IterateIndexes()
method becameIEnumerable<BlockHash>
(wasIEnumerable<HashDigest<SHA256>>
). - The return type of
IStore.IterateBlockHashes()
method becameIEnumerable<BlockHash>
(wasIEnumerable<HashDigest<SHA256>>
). - The type of
IStore.GetBlock<T>()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IStore.GetBlockIndex()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IStore.GetBlockDigest()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IStore.DeleteBlock()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IStore.ContainsBlock()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IStateStore.GetState()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
IStateStore.ContainsBlockStates()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
TrieStateStore.GetRootHash()
method'sblockHash
parameter becameBlockHash
(wasHashDigest<SHA256>
). - The type of
TrieStateStore.PruneStates()
method'sexcludeBlockHashes
parameter becameIImmutableSet<BlockHash>
(wasImmutableHashSet<HashDigest<SHA256>>
).
- The type of
- Hash algorithm for PoW (Hashcash) became
configurable. #1314, #1352
- Added
IBlockPolicy<T>.GetHashAlgorithm()
method. - Added an optional
HashAlgorithmType? hashAlgorithm
parameter toBlock<T>(long, long, BigInteger, Nonce, Address?, BlockHash?, DateTimeOffset, IReadOnlyList<Transaction<T>>, ImmutableArray<byte>?, HashDigest<SHA256>?, int protocolVersion)
constructor. - Added
HashAlgorithmType hashAlgorithm
parameter toBlock<T>.MineBlock()
method. - The type of
Block<T>.PreEvaluationHash
property becameImmutableArray<byte>?
(wasHashDigest<SHA256>?
). [#1192, #1197] - The types of
Block<T>()
constructors'preEvaluationHash
parameter becameImmutableArray<byte>?
(wereHashDigest<SHA256>?
). [#1192, #1197] - The type of
InvalidBlockPreEvaluationHashException.ActualPreEvaluationHash
andExpectedPreEvaluationHash
properties becameImmutableArray<byte>
(wereHashDigest<SHA256>
). [#1192, #1197] - The type of
InvalidBlockPreEvaluationHashException()
constructor'sactualPreEvaluationHash
and andexpectedPreEvaluationHash
parameters becameImmutableArray<byte>
(wereHashDigest<SHA256>
). [#1192, #1197] - Replaced
UnexpectedlyTerminatedActionException()
constructor'sHashDigest<SHA256>? blockHash
parameter withImmutableArray<byte>? preEvaluationHash
. [#1192, #1197] - Replaced
UnexpectedlyTerminatedActionException.BlockHash
property withPreEvaluationHash.
[#1192, #1197] - Replaced
Hashcash.Answer(Stamp, long, CancellationToken)
method withHashcash.Answer<T>(Stamp, HashAlgorithm, long, CancellationToken)
method. - Removed
Hashcash.Hash()
method. - Removed
HashDigest<T>.Satisfies()
method. This was replaced byByteUtil.Satisfies()
method instead. [#1192, #1197] - Added
hashAlgorithmGetter
parameter toBlockSet<T>()
constructor. - Added
hashAlgorithm
parameter toBlockChain<T>.MakeGenesisBlock()
method. - Added an optional
hashAlgorithmGetter
parameter toBlockPolicy<T>()
constructor.
- Added
- Added
IActionContext.TxId
property. [#1275] - Added
IStore.PutTxExecution(TxSuccess)
method. [#1156, #1289] - Added
IStore.PutTxExecution(TxFailure)
method. [#1156, #1289] - Added
IStore.GetTxExecution()
method. [#1156, #1289] - Removed the optional parameter
Guid? chainId = null
fromIStateStore.GetState()
method. [#1289] - Removed
compress
parameter fromDefaultStore()
constructor. [#1289] - Removed
statesCacheSize
parameter fromDefaultStore()
constructor. [#1289] - Removed
StunMessage.Parse(Stream)
method. [#1228] - Moved
ITransport
andNetMQTransport
fromLibplanet.Net
toLibplanet.Net.Transports
. [#1235] Block<T>
now enforces a collection ofTransaction<T>
s to be less mutable. [#1274]- The type of
Block<T>()
constructor'stransactions
parameter becameIReadOnlyList<T>
(wasIEnumerable<T>
). - The type of
Transactions
property ofBlock<T>
becameIReadOnlyList<T>
(wasIEnumerable<T>
).
- The type of
- Types of following properties became
IReadOnlyList<T>
(wasIEnumerable<T>
). [#1230, #1271]RoutingTable.Peers
RoutingTable.PeerStates
Swarm<T>.Peers
Swarm<T>.PeerStates
- Return type of
RoutingTable.Neighbors()
becameIReadOnlyList<BoundPeer>
(wasIEnumerable<BoundPeer>
). [#1230, #1271] - All methods pertaining to evaluating
IAction
s are moved to a newActionEvaluator
class. [#1301, #1305]- Removed
Block<T>.Evaluate()
method. UseActionEvaluator.Evaluate()
method instead. - Removed
Block<T>.EvaluateActionsPerTx()
method. - Removed
Transaction<T>.EvaluateActionsGradually()
method. - Removed
Transaction<T>.EvaluateActions()
method.
- Removed
- Parameters
action
,inputContext
, andoutputStates
forActionEvaluation()
constructor can no longer benull
. [#1305] - Added
IStore.PutTxIdBlockHashIndex(TxId, BlockHash)
method. [#1294, #1328] - Added
IStore.GetFirstTxIdBlockHashIndex(TxId)
method. [#1294, #1328] - Added
IStore.DeleteTxIdBlockHashIndex(TxId, BlockHash)
method. [#1294, #1328] - Added
IStore.IterateTxIdBlockHashIndex(TxId)
method. [#1294, #1328] - Parameter
miner
forBlock<T>()
andBlock<T>.Mine()
can no longer benull
. [#1341] Swarm<T>.StartAsync()
method became to receivebroadcastBlockInterval
(ormillisecondsBroadcastBlockInterval
) parameter. [#1351]- Added the parameter
minimumBroadcastTarget
toNetMQTransport()
constructor. [#1379] - Removed
InvalidTxUpdatedAddressesException
. [#368, #1389]
Added APIs
- Added
ActionEvaluator
class. [#1301, #1305] - Added
BlockHash
struct. [#1192, #1197] - Added
HashDigest<T>.DeriveFrom()
method. [#1197] - Added
HashAlgorithmType
class. [#1314, #1352] - Added
HashAlgorithmGetter
delegate. [#1314, #1352] - Added
HashAlgorithmTable
static class. [#1314, #1352] - Added
BlockChain<T>.GetTxExecution()
method. [#1156, #1289] - Added
StunMessage.ParseAsync(Stream, CancellationToken)
method. [#1228] - Added
Swarm<T>.AddPeersAsync()
method. [#1234] - Added
NetMQTransport.QueryAppProtocolVersion()
static method. [#1235] - Added
BoundPeer.Parse()
static method. [#1240] - Added
TransportException
class. [#1242] - Added
SwarmOptions.StaticPeers
property. [#1230, #1271] - Added
SwarmOptions.StaticPeersMaintainPeriod
property. [#1230, #1367] - Added
SwarmOptions.BranchpointThreshold
property. [#1348] - Added
AtomicActionRenderer<T>
class. [#1267, #1275] - Added
TxExecution
abstract class. [#1156, #1289] - Added
TxSuccess
class. [#1156, #1289] - Added
TxFailure
class. [#1156, #1289] - Added
IExtractableException
interface. [#1156, #1289] - Added
ExtractableException
static class. [#1156, #1289] - Added
Address(Binary)
overloaded constructor. [#1289] - Added
Currency(IValue)
overloaded constructor. [#1289] - Added
Currency.Serialize()
method. [#1289] - Added
ByteUtil.TimingSafelyCompare()
method. [#1314, #1352] - Added
ByteUtil.Satisfies()
method. [#1314, #1352] - Added
BlockChain<T>.ExecuteActions()
method. [#1368] - Added
SwarmOptions.MinimumBroadcastTarget
property. [#1379]
Behavioral changes
BlockChain<T>.Append()
now records aTxExecution
for every single transaction in the appendedBlock<T>
, whether a transaction is successful (TxSuccess
is recorded for this case) or not (TxFailure
is recorded for this case). [#1156, #1289]ITransport.StartAsync()
andITransport.RunAsync()
became to throwTransportException
instead ofSwarmException
. [#1242]NetMQTransport
became to enforce NetMQ/AsyncIO to use its pure .NET implementation instead of Windows' IOCP when it is running on Mono, which powers Unity engine, since Unity does not properly implement the IOCP even on Windows. It had been done bySwarm<T>
, but as theITransport
is now separated from it, this became done byNetMQTransport
instead ofSwarm<T>
. [#247, #1278]- (Libplanet.RocksDBStore)
RocksDBStore.ForkBlockIndexes()
became to share common ancestors between forks rather than duplicating them so that much less space is used. [#1280, #1287] BlockChain<T>.Append()
cumulates indexes for pairs (TxId and BlockHash). A transaction inclusion for a block is retrievable by using this index. [#1315, #1329]ActionEvaluator<T>.EvaluateActions()
now throws an unmanaged exception ifOutOfMemoryException
is caught fromIAction.Execute()
. [#1320, #1343]- Improved performance of broadcasting using
Swarm<T>
. [#1334] Swarm<T>
now maintains static peers provided viaSwarmOptions.StaticPeers
periodically. [#1230, #1367]Block<T>.Header
is now cached instead of creating a new instance every call. [#1347]BlockChain<T>.ExecuteActions()
became no longer throwInvalidTxUpdatedAddressesException
. [#368, #1389]
Bug fixes
- Fixed a bug where executing
Transaction<T>.Actions
had not been atomic.Actions
in aTransaction<T>
now became executed all or nothing at all. [#1267, #1275]Transaction<T>.EvaluateActions()
method became atomic.Transaction<T>.EvaluateActionsGradually()
method had returned the same number ofActionEvaluation
s toTransaction<T>.Actions
, but now became to omit the evaluations after the first action throwing an exception. If no action throws any exception, it still returns the same number ofActionEvaluation
s toTransaction<T>.Actions
.- State-wise,
Transaction<T>
s having any exception-throwing action now do not commit any changes at all toIStateStore
. - Rendering-wise, for actions following the first exception-throwing
action, action rendering methods in
IActionRenderer<T>
(RenderAction()
,RenderActionError()
,UnrenderAction()
, andUnrenderActionError()
) became not invoked. If you want to dismiss all actions in unsuccessful transactions at all, wrap your action renderer withAtomicActionRenderer<T>
.
- Fixed a bug where
KademliaProtocol.BootstrapAsync()
has sent multiplePing
messages to other peers. [#1219] - Fixed a bug where
KademliaProtocol.CheckReplacementCacheAsync()
has updated cached peers multiple times. [#1219] - Fixed memory leak due to undisposed
CancellationTokenRegistration
s. [#1228] - Fixed a bug where
DefaultStore.Dispose()
andTrieStateStore.Dispose()
had not been idempotent. [#1272] - (Libplanet.RocksDBStore) Fixed a bug where
RocksDBStore.Dispose()
,MonoRocksDBStore.Dispose()
, andRocksDBKeyValueStore.Dispose()
had not been idempotent. [#1272, #1289] - Fixed a bug where
NetMQTransport
had hung forever within Mono runtime. [#1278] - Fixed a bug where
DefaultStore.ForkBlockIndexes()
hadn't copied genesis block. [#1325] - (Libplanet.RocksDBStore) Fixed a bug where
RocksDBStore.GetBlock<T>()
andRocksDBStore.GetTransaction<T>()
handn't returned expected values in multithreading environment. [#1339, #1342] - Fixed a bug where chain synchronization had been incorrectly updated with an improper chain. [#1349, #1350]
- Fixed a bug where
Swarm<T>
hadn't respond immediately under load. [#1360]
CLI tools
- Added the option
--json
toplanet apv analyze
command to print result as JSON format. [#1240] - Added
planet apv query
subcommand to query app protocol version of specific peer. [#1240] - Added the option
--no-passphrase
toplanet key remove
command to remove key without asking passphrase. [#1213, #1265] - Added
planet key derive
subcommand to derive the address or public key from a private. [#1268] - Added
planet store [block-by-hash|block-by-index|tx-by-id]
commands to retrieve the data from the store. [#1284, #1285, #1298] - Added
planet store block-by-tx-id
commands to retrieve the data from the store. [#1316, #1340] - Added
planet store build-index-tx-block
commands to build index from TxId to BlockHash. [#1316, #1340] - Added
planet stats summary
command to retrieve a state summary of a stored chain in a CSV format. [#1353]
Version 0.11.1
Released on April 22, 2021.
- Fixed a bug where block synchronization had stopped due to internal errors. [#1259]
Version 0.11.0
Released on March 30, 2021.
Backward-incompatible API changes
- Added the parameter
protocolVersion
toBlock<T>(long, long, BigInteger, Nonce, Address?, HashDigest<SHA256>?, DateTimeOffset, IEnumerable<Transaction<T>> transactions, HashDigest<SHA256>?, HashDigest<SHA256>?)
constructor. [#1142, #1147, #1162] - Added the parameter to
protocolVersion
toBlock<T>.Mine()
method. [#1142, #1147, #1162] - Added the first parameter
protocolVersion
toBlockHeader()
constructor. [#1142, #1147, #1162] - Added
stagePolicy
as the second parameter toBlockChain<T>()
constructor. [#1130, #1131] - Added
IBlockPolicy<T>.CanonicalChainComparer
property to make the canonical chain. [#1155, #1165, #1184] - Added
canonicalChainComparer
as the last parameter toBlockPolicy()
constructors. [#1155, #1165, #1184] - Added
canonicalChainComparer
as the second parameter toDelayedRenderer()
constructor. [#1155, #1165, #1184] - Added
canonicalChainComparer
as the second parameter toDelayedActionRenderer()
constructor. [#1155, #1165, #1184] - Added
reorgResistantHeight
parameter intoDelayedActionRenderer<T>()
constructor. [#1163] - Added
IStore.SetBlockPerceivedTime()
method. [#1184] - Added
IStore.GetBlockPerceivedTime()
method. [#1184] - Removed
TransactionSet<T>
class. [#1165] - Removed
IBlockStatesStore
interface. [#1117] - Removed
BaseBlockStatesStore
abstract class. [#1117] - Removed
Swarm<T>.GetTrustedStateCompleterAsync()
method. [#1117] - Removed
trustedStateValidators
parameter fromSwarm<T>.PreloadAsync()
method. [#1117] - Removed
Swarm<T>.TraceTable()
method. [#1120] - Added
IActionContext.BlockAction
property. [#1143] - Added nullable
TimeSpan
-typedmessageLifespan
parameter intoNetMQTransport()
constructor. [#1171] - Added
IStore.ForkTxNonces()
method. [#1198] - Removed
PeerState.Address
Property. [#1215] IProtocol.RebuildConnectionAsync(CancellationToken)
method was replaced by,IProtocol.RebuildConnectionAsync(int, CancellationToken)
method. [#1215]
Backward-incompatible network protocol changes
Swarm<T>
became no longer retry whenSwarm<T>
receives less than 500 blocks. [#1112]- The existing
ChainStatus
message type (with the type number0x24
) was replaced by a newChainStatus
message type (with the type number0x25
). [#1155, #1165] - Removed the message types depended on features of
IBlockStatesStore
interface. [#1117]GetRecentStates
message type (with the type number0x0b
)RecentStates
message type (with the type number0x13
)GetBlockStates
message type (with the type number0x22
)BlockStates
message type (with the type number0x23
)
Swarm<T>
became to ignore messages made earlier than a certain amount of time, which is configured bySwarmOptions.MessageLifespan
. [#1160, #1171]
Backward-incompatible storage format changes
- (Libplanet.RocksDBStore) The blocks and transactions became stored in
multiple databases. Each block and transaction belongs to a partition
of the database, according to its epoch unit, which is its Unix timestamp.
Every epoch is divided by certain seconds, configured by
RocksDBStore()
constructor'stxEpochUnitSeconds
andblockEpochUnitSeconds
parameters (86,400 by default). [#1183, #1194] - (Libplanet.RocksDBStore) Continue on partitioning of database,
RocksDBStore()
is manage database connection by LRU Cache. The max size of connection cache is configured byRocksDBStore()
constructor'sdbConnectionCacheSize
parameters (100 by default). [#1183, #1194] - (Libplanet.RockDBStore) The
RocksDBStore
that was previously used has been separated into a class calledMonoRocksDBStore
. Please use this class if you need to migrate. [#1183, #1204]
Added APIs
- Added
Block<T>.CurrentProtocolVersion
constant. [#1142, #1147] - Added
Block<T>.ProtocolVersion
property. [#1142, #1147] - Added
Block<T>.Header
property. [#1070, #1102] - Added
BlockHeader.ProtocolVersion
property. [#1142, #1147] - Added
IBlockExcerpt
interface. [#1155, #1165, #1170] - Added
BlockExcerpt
static class. [#1155, #1165, #1170, #1184] Block<T>
became to implementIBlockExcerpt
interface. [#1155, #1165, #1170]BlockHeader
became to implementIBlockExcerpt
interface. [#1155, #1165, #1170]- Added
BlockPerception
struct. [#1155, #1184] - Added
BlockChain<T>.PerceiveBlock()
method. [#1155, #1184] - Added
DelayedRenderer<T>.CanonicalChainComparer
andDelayedActionRenderer<T>.CanonicalChainComparer
properties. [#1155, #1165, #1184] - Added
TotalDifficultyComparer
class. [#1155, #1165, #1170, #1184] - Added
IStagePolicy<T>
interface. [#1130, #1131, #1186] - Added
VolatileStagePolicy<T>
class. [#1130, #1131, #1136, #1186] - Added
ITransport
interface. [#1052] - Added
NetMQTransport
class which implementsITransport
. [#1052] - Added
Message
abstract class. [#1052] - Added
BlockExceedingTransactionsException
class. [#1104, #1110] - Added
BlockChain<T>.GetStagedTransactionIds()
method. [#1089] - (Libplanet.RocksDBStore) Added
maxTotalWalSize
,keepLogFileNum
andmaxLogFileSize
parameters intoRocksDBStore()
constructor. [#1065, #1102, #1132] - Added
Swarm<T>.BlockDemand
property. [#1068, #1102] - Added
BlockDemand
struct. [#1068, #1102] - Added
TurnClient.PublicAddress
property. [#1074, #1102] - Added
TurnClient.EndPoint
property. [#1074, #1102] - Added
TurnClient.BehindNAT
property. [#1074, #1102] - Added
TurnClient.InitializeTurnAsync(int, CancellationToken)
method. [#1074, #1102] - Added
TurnClient.StartAsync(int, CancellationToken)
method. [#1074, #1102] - Added
TurnClient.ReconnectTurn(int, CancellationToken)
method. [#1074, #1102] - Added
TurnClient.IsConnectable(CancellationToken)
method. [#1074, #1102] - Added
TurnClient.ReconnectTurn(CancellationToken)
method. [#1074, #1102] - Added
Libplanet.Blockchain.Renderers.Debug.RenderRecord<T>
abstract class and its subclasses: [#1119]RenderRecord<T>.ActionBase
abstract classRenderRecord<T>.ActionSuccess
classRenderRecord<T>.ActionError
classRenderRecord<T>.BlockBase
abstract classRenderRecord<T>.Block
classRenderRecord<T>.Reorg
class
- Added
Libplanet.Blockchain.Renderers.Debug.RecordingActionRenderer<T>
class. [#1119] - Added
Libplanet.Blockchain.Renderers.Debug.ValidatingActionRenderer<T>
class. [#1119] - Added
Libplanet.Blockchain.Renderers.Debug.InvalidRenderException<T>
class. [#1119] - Added
InvalidBlockProtocolVersionException
class. [#1142, #1147] - Added
InvalidBlockTxHashException
class. [#1116] - Added
Swarm<T>.PeerStates
property. [#1120] - Added
IProtocol
interface. [#1120] - Added
KademliaProtocol
class which implementsIProtocol
. [#1120, #1135] - Added
reorgResistantHeight
parameters intoDelayedActionRenderer<T>()
constructor. [#1163] - Added
InvalidBlockPreEvaluationHashException
class. [#1148] - Added the parameter
validate
which istrue
by default, toTransaction<T>.Deserialize()
. [#1149] - Added
SwarmOptions.MessageLifespan
property. [#1171] - Added
InvalidTimestampException
class. [#1171] - Added
PeerState.Peer
Property. [#1215] - Added
SwarmOptions.RefreshPeriod
property, which is 10 seconds by default. [#1215] - Added
SwarmOptions.RefreshLifespan
property, which is 60 seconds by default. [#1215]
Behavioral changes
- Upgraded Bencodex package (which is a dependency) so that Libplanet gets benefits from its recent optimizations. [#1081, #1084, #1086, #1101]
- Introduced the protocol versioning scheme. This purposes to change the protocol without breaking backward compatibility. Even the protocol is changed, the existing blocks made before the new protocol are guaranteed to behave as it had done. [#1142, #1147, #1155 #1162, #1170, #1184]
- Since
BlockHeader.ProtocolVersion
was added, the existing blocks are considered protocol compliant with the protocol version zero. [#1142, #1147, #1162] - When a
BlockChain<T>
followsVolatileStagePolicy<T>
, which is Libplanet's the only built-inIStagePolicy<T>
implementation at the moment, as itsStagePolicy
, its staged transactions are no longer persistent but volatile instead. It also automatically purges staged transactions after the givenLifetime
, which is 3 hours by default. [#1130, #1131, #1136, #1186] Swarm<T>
became not to receive states from trusted peers. [#1061, #1102]Swarm<T>
became not to retry when block downloading. [#1062, #1102]- Improved performance of
BlockChain<T>.MineBlock()
. [#1116, #1124] - Improved performance of
Block<T>.Deserialize()
. [#1116] Swarm<T>
became not to fill states from trusted peers, because now states can be validated rather than trusted due to MPT. [#1117]HashDigest<SHA256>
became serializable. [#795, #1125]Transaction<T>()
constructors became not to validate itself. [#1149]BlockChain<T>.Append()
became to validate the givenBlock<T>
before storing itsStateRootHash
. [#1172]Blockchain<T>
became not to stage transactions having nonce less than or equal to the nonce of the same signer's latest transaction in already mined blocks. [#1173, #1180, #1186]- Improved security of
Message.Parse()
. [#1161, #1181] - Improved performance of
BlockChain<T>.Fork()
. [#1198] Swarm<T>
became not to callKademliaProtocol.RebuildConnectionAsync()
right afterSwarm<T>.StartAsync()
. If you calledSwarm<T>.BootstrapAsync()
beforeSwarm<T>.StartAsync()
, peers in your table may not have you in their table right afterSwarm<T>.StartAsync()
(which was almost guaranteed before). [#1208]- Peers added during
Swarm<T>.BootstrapAsync()
beforeSwarm<T>.StartAsync()
are now marked as stale so thatSwarm<T>.RefreshTableAsync()
will update. [#1215] - Following classes became to leave log messages with its class as logging
context. [#1218]
TrieStateStore
classTurnClient
classActionEvaluation
class
Bug fixes
- Fixed a bug where
BlockChain<T>.MineBlock()
was not automatically cancelled when the tip of the chain was changed occasionally. [#1141] - Fixed a bug where blocks with invalid
PreEvaluationHash
was considered as a valid block. [#1148, #1202] - Fixed a vulnerability of the
IAccountStateDelta.TransferAsset()
's internal implementation that it had doubled recipient's balance when a sender and a recipient is the same. *Since this changes the protocol, for backward compatibility, the actions belonging to the existing block, which was mined before the protocol v1, are guaranteed to still behave as it had done. [#1152] - Fixed a bug where
Block<T>.Evaluate()
hadn't validate its hash. [#1168] - Fixed memory leak due to undisposed
CancellationTokenSource
s. [#1182, #1212] - Fixed a bug where
TurnClient
hadn't released its relay connections after reconnecting. [#1185]
CLI tools
planet mpt diff
command became to take 4 arguments (which was 3) so that it can compare state root hashes from two different KV stores. The existing commands likeplanet mpt diff STORE A B
do not work anymore, and these should be instead likeplanet mpt diff STORE A STORE B
. [#1129]- Store aliases used by
planet mpt
became to disallow names looking like URIs to disambiguate aliases from the literal store URIs. [#1129] - Added new subcommands
planet mpt list
andplanet mpt query
. [#1137] planet mpt diff
command became to print the differences between other state root hashes into stdout as JSON format. [#1138, #1191, #1233]
Version 0.10.3
Released on January 28, 2021.
BlockChain<T>.MineBlock()
became to unstage transactions that have lower nonce than expected. [#1174]
Version 0.10.2
Released on November 25, 2020.
- Fixed
BlockChain<T>.Append()
method's bug that it had accepted aBlock<T>
having moreTransactions
than the number specified by theIBlockPolicy<T>.MaxTransactionsPerBlock
property. Now it throwsInvalidBlockException
instead for such case. [#1104]
Version 0.10.1
Released on November 24, 2020.
Transaction<T>.Id
property became lazy-loaded and cached if it's once loaded. (It had been loaded when the object is instantiated.) [#1079, #1080]- The result bytes of
Transaction<T>.Serialize()
became cached under the hood. [[#1079, #1080]] - Fixed
BlockChain<T>.MineBlock()
method's bug which excludes one's all transactions virtually forever after a signer's transactions once have been staged without the ascending order of nonce (usually due to their inconsistent propagation latency on the network). [#1057, #1059] BlockChain<T>.MineBlock()
method became to cut off staged transactions to mine if it takes longer than 4 seconds to collect and validate them. Those rest staged transactions are postponed until next block mining. [#1057, #1059]BlockChain<T>.ContainsBlock()
method was optimized so that it does not needlessly load an entire block, but looks up only an index instead. [#1057, #1059]BlockChain<T>
became not to validate genesis block during fork, where the state store is not an implementation ofIBlockStatesStore
. [#1063]- Fixed a bug where
Swarm<T>.GetPeerChainStateAsync()
has thrownNullReferenceException
when peers in table does failed to respond. [#1066] - Fixed a bug where
BlockChain<T>
had not locked readers–writer lock for state changes duringMineBlock()
. [#1077, #1087] PolymorphicAction<T>.ToString()
became more human-readable. [#1085, #1087]- Fixed a bug where
MerkleTrie
had hadMrrkleTrie.EmptyRootHash
as root node, which had been unable to insert new nodes. [#1087, #1091]
Version 0.10.0
Released on October 27, 2020.
Backward-incompatible API changes
- Extracted rendering methods from
IAction
toIRenderer<T>
, which is introduced in this version. From now on, rendering logic needs to be injected from outside throughBlockChain<T>.Renderers
, rather thanIAction
s knowing how to render themselves.IRenderer<T>
also unifiedBlockChain<T>.TipChanged
event, and introduced new events likeIActionRenderer<T>.RenderActionError()
,IActionRenderer<T>.RenderBlockEnd()
,IRenderer<T>.RenderReorg()
, andIRenderer<T>.RenderReorgEnd()
. [#860, #875, #959, #963]- Removed
IAction.Render()
method, which was replaced byIActionRenderer<T>.RenderAction()
. - Removed
IAction.Unrender()
method, which was replaced byIActionRenderer<T>.UnrenderAction()
. - Removed
BlockChain<T>.TipChanged
event, which was replaced byIRenderer<T>.RenderBlock()
. - Removed
PolymorphicAction<T>.Render()
andUnrender()
methods. - Removed
BlockChain<T>.TipChangedEventArgs
class.
- Removed
- Added methods related fungible asset states to
IAccountStateDelta
: [#861, #900, #954]UpdatedFungibleAssetsAccounts
propertyMintAsset(Address, Currency, BigInteger)
methodTransferAsset(Address, Address, Currency, BigInteger)
methodBurnAsset(Address, Currency, BigInteger)
methodGetBalance(Address, Currency)
method
- Added
IAccountStateDelta.StateUpdatedAddresses
property in order to distinguish state updates from asset states. [#861, #900] - Added an optional parameter
AccountBalanceGetter accountBalanceGetter
toBlock<T>.EvaluateActionsPerTx()
method. [#861, #900] BlockChain<T>.StageTransaction()
became to throwInvalidTxGenesisHashException
when it takes aTransaction<T>
from a heterogeneousBlockChain<T>
with a different genesis block. [#796, #878]- Added
renderers
optional parameter toBlockChain<T>()
constructor. [#883, #959, #963] - Added
BigInteger
-typedtotalDifficulty
parameter toBlock<T>()
constructor. [#666, #917] - Added
BigInteger
-typedpreviousTotalDifficulty
parameter toBlock<T>.Mine()
static method. [#666, #917] - Added
options
optional parameter toSwarm<T>()
constructor. [#926] ICryptoBackend
became toICryptoBackend<T>
. [#932]ICryptoBackend.Verify(HashDigest<SHA256>, byte[], PublicKey)
became toICryptoBackend<T>.Verify(HashDigest<T>, byte[], PublicKey)
[#932]- Added
ICryptoBackend<T>.Sign(HashDigest<T>, PrivateKey)
method. [#932] DefaultCryptoBackend
became toDefaultCryptoBackend<T>
. [#932]- Added
ImmutableArray<byte>
-typedpreEvaluationHash
parameter toBlockHeader
constructor. [#931, #935] - Added
HashDigest<SHA256>
-typedpreEvaluationHash
parameter toBlock<T>()
constructor. [#931, #935] - Replaced
SerializationInfoExtensions.GetValueOrDefault<T>()
toSerializationInfoExtensions.TryGetValue<T>()
. [#940] - Added
bool append = true
option to bothBlockChain<T>.MineBlock()
overloaded methods. Although this breaks ABI-level backward compatibility (i.e., you need to rebuild your assemblies), still is backward-compatible at API-level as the option is turned on by default. [#946] - Added
int? maxTransactions
option to bothBlockChain<T>.MineBlock()
overloaded methods. Although this breaks ABI-level backward compatibility (i.e., you need to rebuild your assemblies), still is backward-compatible at API-level as the option is turned on by default. [#1037, #1039, #1050] - Added
StateCompleterSet<T>? stateCompleters
option to twoBlockChain<T>.Append()
overloaded methods. Although this breaks ABI-level backward compatibility (i.e., you need to rebuild your assemblies), still is backward-compatible at API-level as the option has the default value (StateCompleterSet<T>.Recalculate
). [#946] - Added
CancellationToken cancellationToken = default(CancellationToken)
option toBlockChain<T>.MineBlock(Address miner)
overloaded method. Although this breaks ABI-level backward compatibility (i.e., you need to rebuild your assemblies), still is backward-compatible at API-level as the option has the default value. [#946] - Added
IImmutableSet<Address> trustedStateValidators = null
option to bothSwarm<T>.StartAsync()
overloaded methods. Although this breaks ABI-level backward compatibility (i.e., you need to rebuild your assemblies), still is backward-compatible at API-level as the option is turned on by default. [#946] - Removed
Peer.AppProtocolVersion
property. [#949] - Removed
Peer.IsCompatibleWith()
method. [#949] - Replaced
Peer(PublicKey, AppProtocolVersion)
constructor withPeer(PublicKey)
constructor. [#949] - Replaced
BoundPeer(PublicKey, DnsEndPoint, AppProtocolVersion)
constructor withPeer(PublicKey, DnsEndPoint)
constructor. [#949] - Extracted
IStore
's some methods dedicated to block states intoIBlockStatesStore
. [#950]ListStateKeys()
method.ListAllStateReferences()
method.LookupStateReference()
method.IterateStateReferences()
method.StoreStateReference()
method.ForkStateReferences()
method.GetBlockStates()
method.SetBlockStates()
method.PruneBlockStates()
method.
- The signature of
IStore.LookupStateReference<T>(Guid, string, Block<T>)
method was changed toLookupStateReference(Guid, string, long)
. [#950] - Added
IStateStore
-typedstateStore
toBlockChain<T>
constructor. [#950] - Replaced
Swarm<T>.FindSpecificPeerAsync(Address, Address, int, BoundPeer, TimeSpan?, CancellationToken)
method withSwarm<T>.FindSpecificPeerAsync(Address, int, TimeSpan?, CancellationToken)
. [#981] - Added
IActionContext.GetUnconsumedContext()
method. [#980] - Added
ImmutableArray<byte>
-typedstateRootHash
parameter toBlockHeader
constructor. [#986] - Added
HashDigest<SHA256>
-typedstateRootHash
parameter toBlock<T>()
constructor. [#986] - Added
IBlockPolicy<T>.MaxTransactionsPerBlock
property. [#1037, #1050] - Added
IBlockPolicy<T>.GetMaxBlockBytes()
method. [#201, #1050] IBlockPolicy<T>.DoesTransactionFollowPolicy()
method became to take additionalBlockChain<T>
parameter as its context. [#1012]- Methods in
BlockPolicy<T>
class becamevirtual
. [#1010] - Added
int maxTransactionsPerBlock
option to bothBlockPolicy<T>()
overloaded constructors. [#1037, #1050] - Added
int maxBlockBytes
andint maxGenesisBytes
options to bothBlockPolicy<T>()
overloaded constructors. [#201, #1050] BlockPolicy<T>()
constructor'sdoesTransactionFollowPolicy
parameter becameFunc<Transaction<T>, BlockChain<T>, bool>
on . [#1012]- Added
cacheSize
optional parameter toBlockSet<T>()
constructor. [#1013] - Removed
Address(SerializationInfo, StreamingContext)
constructor. [#1022] - Removed constructors from
InvalidMessageException
class. [#1021]
Backward-incompatible network protocol changes
- The message field
RecentStates.StateReferences
became toIImmutableDictionary<string, IImmutableList<HashDigest<SHA256>>>
fromIImmutableDictionary<Address, IImmutableList<HashDigest<SHA256>>>
. [#912] - The existing
RecentStates
message type (with the type number0x0f
) was replaced by a newRecentStates
message type (with the type number0x13
). [#912] - Added
BlockHeader.TotalDifficulty
property. [#666, #917] - The existing
Pong
message type (with the type number0x02
) was replaced by a newPong
message type (with the type number0x14
). [#459, #919, #920, #930] - The
TimestampThreshold
betweenBlock<T>
s was changed from 15 minutes to 15 seconds. [#922, #925] Swarm<T>
became to have 5 more message types:- Every message now contains app protocol version in its header. [#949]
- The existing
BlockHeaderMessage
message type (with the type number0x0d
) was replaced by a newBlockHeaderMessage
message type (with the type number0x0c
). [#1003, #1004] - Removed
PreloadBlockDownloadFailEventArgs
class. [#1002] - Removed
blockDownloadFailed
parameter fromSwarm<T>.PreloadAsync()
method. UseSwarmOptions.BlockDownloadTimeout
instead. [#1002]
Backward-incompatible storage format changes
- Added
RawTransaction<T>.GenesisHash
property. [#796, #878] - Added
BlockHeader.TotalDifficulty
property. [#666, #917]
Added APIs
- Added
Currency
struct. [#861, #900, #954] - Added
FungibleAssetValue
struct. [#861, #944, #954] - Added
AccountBalanceGetter
delegate. [#861, #900, #954] - Added
TurnClient.BindProxies()
method. [#756, #868] - Added
ActionEvaluation.Exception
property. [#860, [#875]] - Added
InvalidTxGenesisHashException
class. [#796, #878] - Added
InvalidBlockBytesLengthException
class. [#201, #1050] - Added
CurrencyPermissionException
class. [#861, #900] - Added
InsufficientBalanceException
class. [#861, #900, #954] - Added
BlockChain<T>.GetBalance()
method. [#861, #900] - Added
Block<T>.TotalDifficulty
property. [#666, #917] - Added
Block<T>.BytesLength
property. [#201, #1050] - Added
SwarmOptions
class. [#926] - Added
PeerChainState
struct. [#936] - Added
Swarm<T>.GetPeerChainStateAsync()
method. [#936] - Added
Swarm<T>.LastMessageTimestamp
property. [#964] - Added
Block<T>.PreEvaluationHash
property. [#931, #935] - Added
BlockHeader.PreEvaluationHash
property. [#931, #935] - Added
Transaction<T>.BytesLength
property. [#201, #1050] - Added
HashDigest(ImmutableArray<byte>)
constructor. [#931, #935] - Incomplete block states became able to be handled in more flexible way.
[#929, #934, #946, #954]
- Replaced
BlockChain<T>.GetState(Address, HashDigest<SHA256>?, bool)
method withGetState(Address, HashDigest<SHA256>?, StateCompleter<T>)
method. SpecifyingcompleteStates: true
andfalse
can be replaced bystateCompleter: StateCompleters<T>.Recalculate
andStateCompleters<T>.Reject
, respectively. - Replaced
BlockChain<T>.GetBalance(Address, Currency, HashDigest<SHA256>?, bool)
method withGetState(Address, Currency, HashDigest<SHA256>?, StateCompleter<T>)
method. SpecifyingcompleteStates: true
andfalse
can be replaced bystateCompleter: FungibleAssetStateCompleters<T>.Recalculate
andFungibleAssetStateCompleters<T>.Reject
, respectively. - Added
StateCompleter<T>
delegate. - Added
FungibleAssetStateCompleter<T>
delegate. - Added
StateCompleterSet<T>
struct. - Added
StateCompleters<T>
static class. - Added
FungibleAssetStateCompleters<T>
static class. - Added
Swarm<T>.GetTrustedStateCompleterAsync()
method.
- Replaced
- Added
IRenderer<T>
interface. [#959, #963] - Added
IActionRenderer<T>
interface. [#959, #967, #970] - Added
AnonymousRenderer<T>
class. [#959, #963] - Added
AnonymousActionRenderer<T>
interface. [#959, #967, #970] - Added
DelayedRenderer<T>
class. [#980, #1029] - Added
DelayedActionRenderer<T>
class. [#980, #1029] - Added
LoggedRenderer<T>
class. [#959, #963] - Added
LoggedActionRenderer<T>
interface. [#959, #967, #970] - Added
BlockChain<T>.Renderers
property. [#945, #959, #963] - Added
BlockChain<T>.ActionRenderers
property. [#959, #967, #970] - Added
Swarm<T>.AppProtocolVersion
property. [#949] DefaultStore
became to implementIBlockStatesStore
. [#950]- Added
IStateStore
interface. [#950] - Added
IBlockStatesStore
interface. [#950] - Added
TrieStateStore
class. [#939] - Added
ITrie
interface. [#939, #1023] - Added
MerkleTrie
class. [#939, #1023] - Added
IKeyValueStore
interface. [#939] - Added
DefaultKeyValueStore
class. [#939] - Added
CacheableKeyValueStore
class. [#939] - (Libplanet.RocksDBStore)
RocksDBStore
became to implementIBlockStatesStore
. [#950] - (Libplanet.RocksDBStore) Added
RocksDBKeyValueStore
. [#939] - Added
InvalidBlockStateRootHashException
class. [#986] - Added
Block<T>.StateRootHash
property. [#986] - Added
BlockHeader.StateRootHash
property. [#986] - Added
MerkleTrieExtensions
static class. [#1023] - Added
IAccountStateDelta.PreviousStateRootHash
property to calculate states until previous action as state root hash. [#1030] - Added
UnexpectedlyTerminatedActionException.PreviousStateRootHash
property. [#1032]
Behavioral changes
- Improved performance of
Swarm<T>
. Transaction<T>.Create()
,Transaction<T>.EvaluateActions()
andTransaction<T>.EvaluateActionsGradually()
no longer throwUnexpectedlyTerminatedActionException
directly. Instead, it records an exception toActionEvaluation
s. [#860, #875]- Added
Transaction<T>.GenesisHash
property. [#796, #878] - Added
IAccountStateDelta.UpdatedAddresses
property contains asset updates besides state updates. [#861, #900] BlockChain<T>.Append()
method became to throwInvalidBlockBytesLengthException
if the given block's serialized bytes is longer than the limitation configured byIBlockPolicy.GetMaxBlockBytes()
. [#201, #1050]BlockChain<T>.MineBlock()
method became to cut off transactions to include to fit into the limitation configured byIBlockPolicy.GetMaxBlockBytes()
. [#201, #1050]Swarm<T>
became to ignore received transaction with different genesis hash. [#796, #878]Swarm<T>
became to ignore invalidBlockHeader
s immediately. [#898]Swarm<T>.PreloadAsync()
became to clean up only temporary chains. [#902]BlockPolicy<T>
became to validateBlock<T>.TotalDifficulty
property of aBlock<T>
. [#666, #917]Swarm<T>
became to preload from peer that has the most difficult chain. [#459, #919]Swarm<T>
became to promote the most difficult chain as a canonical chain instead of the longest chain. [#459, #919]Swarm<T>.BootstrapAsync()
method became not to throwTimeoutException
when it fails to connect to all neighbors. [#933]Swarm<T>
became to respond to the messages with different app protocol version. [#949]Swarm<T>.PreloadAsync()
became to execute the actions from the branchpoint rather than the genesis block when there is a branch point. [#991]BlockPolicy<T>
became to validateBlock<T>.StateRootHash
property of aBlock<T>
. [#986]Swarm<T>
became not to syncBlock<T>
s from the peers with different genesis block. [#1003, #1004]Swarm<T>
became to ignoreBlockHeaderMessage
from the peers with different genesis block. [#1003, #1004]BlockChain<T>
instead ofBlockPolicy<T>
became to validateBlock<T>
s to append so that even if an empty implementation ofIBlockPolicy<T>
is usedBlock<T>
s are unable to be appended toBlockChain<T>
. [#1010]BlockSet<T>[HashDigest<SHA256>]
andBlockChain<T>.Genesis
became cached so that they become faster to get. [#1013]Swarm<T>.PreloadAsync()
became to do not render blocks. [#1029]
Bug fixes
- Fixed a bug that
Swarm<T>
had failed to receive a request from TURN relay connections. [#404, #871, #890] - Fixed a bug where
Swarm<T>
had been terminated and never reconnected when it had been once disconnected from TURN (mostly due to sleep mode, etc.). [#909] - Fixed a bug in which pre-computed state delivery had failed when a state
key is not an
Address
when preloading. [#912] - Fixed a bug where
UnexpectedlyTerminatedException
hadn't been serialized withBinaryFormatter
. [#913] - Fixed a bug where
TurnClient
hadn't applied cancellation token to its connections. [#916] - Fixed a bug where
BlockChain<T>.GetRawState()
had overwritten block states without read lock. [#927] - Fixed a bug that
Swarm<T>
had not respond toGetRecentStates
message when the target block does not exist in the chain. [#941] - Fixed a bug that
Swarm<T>.StartAsync()
had not worked afterSwarm<T>.StopAsync()
was once called. [#965] - Fixed a bug that
TurnClient
had thrownInvalidOperationException
when reconnecting. [#957, #972] - Fixed a bug that
Swarm<T>
had not received block headers after failing to receive previous blocks. [#996] - Fixed a bug that
Swarm<T>
had thrownInvalidGenesisBlockException
when reorg its chain repeatedly. [#996] - Fixed a bug that
Swarm<T>
had propagated invalid transactions. [#1043]
Static analyzer
- Introduced the Libplanet.Analyzers package, a Roslyn Analyzer, which
checks if code has common mistakes prone to made with Libplanet-powered
game apps, e.g., breaking determinism in
IAction
implementations. [#1034]
CLI tools
- The
planet
command became installable usingnpm
. [#923, #982] - Fixed a bug that ^H had not removed the rightmost character in passphrase prompts. [#983, #984]
- Added a new sub-command
planet mpt
. [#1023, #1026] - Introduced a configuration file. It's placed in: [#1023, #1026]
- Linux/macOS: $XDG_CONFIG_HOME/planetarium/cli.json
- Windows: %AppData%\planetarium\cli.json
Version 0.9.5
Released on June 12, 2020.
Version 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]
Version 0.9.3
Released on May 29, 2020.
- Fixed a
Swarm<T>.PreloadAsync()
method's bug that had hanged in a state downloading block hashes and finally unexpectedly terminated when a peer's chain had gotten reorged. [#880, #884]
Version 0.9.2
Released on May 20, 2020.
- (Libplanet.RocksDBStore) Fixed a memory leak bug in
RocksDBStore
. [#870]
Version 0.9.1
Released on May 7, 2020.
- Fixed a bug where the canonical chain had changed if any actions had thrown
an exception during
Swarm<T>.PreloadAsync()
. [#862] - Fixed a
Swarm<T>.PreloadAsync()
method's bug that it had hung forever and raisedInvalidOperationException
. [#847, #864]
Version 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
.
Version 0.8.0
Released on February 4, 2020.
Backward-incompatible API changes
- The internal representation for state keys became
string
(wasAddress
). [#368, #774]- The return type of
IStore.GetBlockStates()
method becameIImmutableDictionary<string, IValue>
(wasAddressStateMap
, which was removed too). [#368, #774] - The type of the second parameter of
IStore.SetBlockStates()
method becameIImmutableDictionary<string, IValue>
(wasAddressStateMap
, which was removed too). [#368, #774] - The second parameter of
IStore.IterateStateReferences()
method becamestring key
(wasAddress address
). [#368, #774] - The second parameter of
IStore.StoreStateReference()
method becameIImmutableSet<string> keys
(wasIImmutableSet<Address> addresses
). [#368, #774] IStore.ListAddresses()
method was replaced byIStore.ListStateKeys()
method. [#368, #774]
- The return type of
- Added
Swarm<T>.FindSpecificPeer()
method to find a specific peer given the address. [#570, #580] - Removed
LiteDBStore
class. UseDefaultStore
instead. [#662] - Removed
BlockChain<T>.Contains(TxId)
method. UseIStore.ContainsTransaction(TxId)
instead. [#676] - Renamed
BlockChain<T>.Contains(HashDigest<SHA256>)
method toBlockChain<T>.ContainsBlock(HashDigest<SHA256>)
. [#678] - Removed
BlockChain<T>.Contains(Block<T>)
method. [#678] - Changed semantics of
BlockChain<T>.ContainsBlock(HashDigest<SHA256>)
method andBlockChain<T>[HashDigest<SHA256>]
indexer as lookups only the current chain, not entire storage. [#678] - Added
IStore.ContainsBlock(HashDigest<SHA256>)
method. [#678] - Removed
AddressStateMap
class. [#98, #368, #692, #774]- The return type of
BlockChain<T>.GetState()
method becameIValue
(wasAddressStateMap
). - The return type of
IStore.GetBlockStates()
method becameIImmutableDictionary<string, IValue>
(wasAddressStateMap
). IStore.SetBlockStates()
method became to takeIImmutableDictionary<string, IValue>
instead ofAddressStateMap
.
- The return type of
Swarm<T>.PreloadAsync()
method andSwarm<T>.StartAsync()
method became to takepreloadBlockDownloadFailed
event handler as an argument. [#694]- Added the
genesisBlock
parameter toBlockChain<T>()
constructor. [#688] - Removed
StateReferenceDownloadState
class. [#703] - Removed
BlockStateDownloadState
class. [#703] - Removed
TxReceived
andBlockReceived
AsyncAutoResetEvent
s fromSwarm<T>
. [#705, #725] - Added
workers
optional parameter intoSwarm<T>()
constructor. [#613, #727] Block<T>
class became not to implementISerializable
. [#751]Transaction<T>
class became not to implementISerializable
. [#751]Block<T>.ToBencodex()
became to returnBencodex.Types.Dictionary
. [#751]Transaction<T>.ToBencodex()
became to returnBencodex.Types.Dictionary
. [#751]- Removed
Block<T>.FromBencodex(byte[])
method. [#751] - Removed
Transaction<T>.FromBencodex(byte[])
method. [#751] Block<T>.ToBencodex()
became to take no arguments. [#749, #757]- Removed
Swarm<T>.BroadcastBlocks(IEnumerable<Block<T>>)
method. [#764] StoreExtension.LookupStateReference<T>()
method was replaced byIStore.LookupStateReference<T>()
method. [#722, #774]
Backward-incompatible network protocol changes
- Added
long
-typedoffset
parameter toRecentStates
andGetRecentStates
messages. [#703] - Added
int
-typediteration
parameter toRecentStates
message. [#703] - Added
BlockHeaderMessage
message. [#764]
Backward-incompatible storage format changes
- The introduced
DefaultStore
is incompatible at the file-level with theLiteDBStore
which had existed.DefaultStore
became to take a directory instead of a single file, and it consists of multiple subdirectories and a LiteDB file for indices. [#662, #680]
Added APIs
- Added
DefaultStore
class to replaceLiteDBStore
. [#662] - Added
IStore.ListAllStateReferences<T>()
method. [#701, #703] - Added
IStore.ListStateKeys()
method to replaceIStore.ListAddresses()
method. [#368, #774] - Added
IStore.LookupStateReference<T>()
method to replaceStoreExtension.LookupStateReference<T>()
method. [#368, #722, #774] - Added
BlockChain<T>.Genesis
property. [#688] - Added
BlockChain<T>.MakeGenesisBlock()
static method. [#688] - Added
InvalidGenesisBlockException
class. [#688] - Added
StateDownloadState
class, a subclass ofPreloadState
, which reports state preloading iteration progress. [#703] - Added
PeerDiscoveryException
class which inheritsSwarmException
class. [#604, #726] - Added
Swarm<T>.Peers
property which returns an enumerable of peers inSwarm<T>
's routing table. [#739] - Added
Block<T>.Serialize()
method which returnsbyte[]
. [#751] - Added
Transaction<T>.Serialize()
method which returnsbyte[]
. [#751] - Added
Block<T>(Bencodex.Types.Dictionary)
constructor. [#751] - Added
Transaction<T>(Bencodex.Types.Dictionary)
constructor. [#751] - Added
Block<T>.Deserialize(byte[])
method. [#751] - Added
Transaction<T>.Deserialize(byte[])
method. [#751] - Added
StoreExtension.Copy(this IStore, IStore)
extension method. [#753] - Added a
HashDigest<SHA256>?
-typedTxHash
property which digests all transactions in the block toBlock<T>
class. [#749, #757] - Added
CryptoConfig
class. [#758] - Added
ICryptoBackend
class. [#758] - Added
DefaultCryptoBackend
class. [#758] - Added
Swarm<T>.BroadcastBlock(Block<T>)
method. [#764] - Added
Swarm<T>.PeerStates
property. [#772] - Added
PeerState
class which represents aPeer
s state in the routing table. [#772] - Added
Swarm<T>.CheckAllPeersAsync()
method. [#772]
Behavioral changes
Swarm<T>
became to compare only peer's addresses instead of public keys to determine if a peer is in routing table or not. [#665]- When
Swarm<T>.PreloadAsync()
method fails to download blocks,Swarm<T>
became to callpreloadBlockDownloadFailed
event handler taken as an argument. If the event handler is not present,Swarm<T>
throwsSwarmException
. [#694] Swarm<T>.PreloadAsync()
became not to sync state references and block states at once. [#703]Swarm<T>
became to print less logs on debug level during sending states. [#706]- Increased
Swarm<T>
's network timeout value, in order to be stable a high latency internet connection. [#709] Swarm<T>.BootstrapAsync()
became to reportPeerDiscoveryException
instead ofSwarmException
directly. [#604, #726]BlockChain<T>.Append()
became to unstage the stagedTransaction<T>
s that have lower nonce than the highest nonce of the same signer's transactions in the same chain, since these virtually never become valid. [#721, #728]Swarm<T>
became not to fill blocks if received block hashes are continuous. [#732]Swarm<T>
became to can process more requests at once by creating TURN relaying proxy concurrently. [#744]Swarm<T>
became to throwInvalidGenesisBlockException
when receiving block from the nodes that have a different genesis block. [#746]Swarm<T>
became to distinguish the starting stages clearly. In other words,Swarm<T>.StartAsync()
became not to callSwarm<T>.PreloadAsync()
. [#735, #760]- The hash of
Block<T>
has changed due to the change in the method of serialization. [#762] Swarm<T>
became to ignore broadcasted block that has lower index than the current tip. [#764]- The way
Swarm<T>
chose peers to spread messages has changed. [#765, #767]- If there are less than 10 peers in the routing table, select all peers.
- If there are more than 10 peers in the routing table, choose one from each bucket, and if the number is less than 10, then select an additional peers so that the total is 10.
Bug fixes
- Fixed a bug where the canonical chain could be deleted if
Swarm<T>
failed to download blocks due to network connection. [#675] - Fixed bug that re-download block from scratch in preloading. [#685]
- Fixed a bug where state references become outdated if a chain is forked and then adding existing blocks into it. [#704]
- Fixed a bug where
Swarm<T>
had exhausted all available sockets. [#709] - Fixed a bug where
Swarm<T>
had infinitely repeated failed requests. [#709] - Fixed a bug where
Swarm<T>
hadn't stopped properly. [#709] - Fixed a bug where
Swarm<T>.BootstrapAsync()
had stopped due to trivial (recoverable)TimeoutException
s. [#715, #716] - Fixed a bug where
BlockChain<T>.GetNextTxNonce()
had returned invalid tx nonce. [#718] - Fixed a bug where mined transactions were staged again. [#719]
- Fixed a bug where
Block<T>.Hash
property,Block<T>.Mine()
method,Block<T>.FromBencodex()
method,Block<T>.ToBencodex()
method,Transaction<T>.Id
property,Transaction<T>.Signature
property,Transaction<T>.Create()
method,Transaction<T>.FromBencodex()
method, andTransaction<T>.ToBencodex()
method had been non-deterministic on someCultureInfo.CurrentCulture
(e.g.,ar_SA
,fr_FR
,th_TH
) so that it had caused network protocol incompatibilities. [#734] - Fixed a bug where the states became empty between the tip of the peer to receive the states and the tip of the downloaded block. [#736]
- Fixed a bug where
Swarm<T>.StartAsync()
had thrownNullReferenceException
whenhost
parameter is present on the outside of NAT. [#744] - Fixed a bug where
Swarm<T>
had failed to request a TURN relay when it has an IPv6 address. [#744] - Fixed a bug where
DefaultStore
had invalid state references cache after fork. [#759] - Fixed a bug where
BlockChain<T>
had rendered and evaluated actions in the genesis block during forking. [#763] - Fixed a
Swam<T>
's bug that someTransaction<T>
s had become excluded from miningBlock<T>
s after reorg from α to β where aTransaction<T>
was once included by aBlock<T>
(α) and not included by an otherBlock<T>
(β) for the sameIndex
due to the latency gap between nodes. [#775] - Fixed a bug where
TransactionSet
andBlockSet
has halt whole process when runTrace.Assert()
. [#806, #833]
Version 0.7.0
Released on November 8, 2019.
Backward-incompatible interface changes
- Renamed
minValue
/maxValue
parameters tolowerBound
/upperBound
ofIRandom.Next()
methods. [#555, #558] - Renamed
IStore.IterateIndex()
method toIterateIndexes()
. [#462, #560] Swarm<T>
class became to implementIDisposable
again and should be disposed to clean up its internal resources. [#485]IStore.IterateStateReferences()
method became to receivehighestIndex
,lowestIndex
, andlimit
parameters. [#447, #545]- Reworked
BlockChain<T>.GetStates()
intoGetState()
which takes only oneAddress
instead ofIEnumerable<Address>
. [#510, #563] - Types of
IAction.PlainValue
and states became restricted toBencodex.Types.IValue
. [#541, #552]IAction.LoadPlainValue(IImmutableDictionary<string, object>)
method became replaced byLoadPlainValue(IValue)
.AccountStateGetter
became to returnIValue
, notobject
.- Added
BencodexExtension
static class.
- Removed
BlockChain<T>.Blocks
. [#409, #583] - Removed
BlockChain<T>.Transactions
. [#409, #583] - Removed the
linger
parameter from theSwarm<T>()
constructor, and added thewaitFor
parameter toSwarm<T>.StopAsync()
method instead. [#581] - Removed the
dialTimeout
parameter from theSwarm<T>
() constructor, and added it toSwarm<T>.PreloadAsync()
&Swarm<T>.StartAsync()
methods. [#581] - Removed
broadcast
parameter fromBlockChain<T>.MakeTransaction()
method. [#609] BlockChain<T>
does not implementIReadOnlyList<T>
anymore. [#630]- Added
BlockChain<T>.Count
property. [#630] - Removed
BlockChain<T>.LongCount()
method. [#630] - Removed
BlockChain<T>.Validate()
method. [#630] - Removed
BlockChain<T>.GetEnumerate()
method. [#630] - Removed
BlockPolicyExtension.ValidateBlocks()
method. [#630] IBlockPolicy<T>.GetNextBlockDifficulty()
method became to receiveBlockChain<T>
instead ofIReadOnlyList<Block<T>>
. [#630]IBlockPolicy<T>.ValidateNextBlock()
method became to receiveBlockChain<T>
instead ofIReadOnlyList<Block<T>>
. [#630]
- Added
Added interfaces
- Added
ProtectedPrivateKey
class. [#577, #614] - Added
IncorrectPassphraseException
class. [#577, #614] - Added
MismatchedAddressException
class. [#577, #614] - Added
KeyJsonException
abstract class. [#577, #614] - Added
InvalidKeyJsonException
class. [#577, #614] - Added
UnsupportedKeyJsonException
class. [#577, #614] - Added
ICipher
interface. [#577, #614] - Added
Aes128Ctr
class. [#577, #614] - Added
IKdf
interface. [#577, #614] - Added
Pbkdf2
class. [#577, #614] - Added
Scrypt
class. [#642, #654] - Added
BlockChain<T>.LongCount()
method. [#575] - Added
BlockChain<T>[HashDigest<T>]
indexer. [#409, #583] - Added
BlockChain<T>.Contains(HashDigest<T>)
method. [#409, #583] - Added
BlockChain<T>.GetTransaction(TxId)
method. [#409, #583] - Added
BlockChain<T>.Contains(TxId)
method. [#409, #583] - Added
ByteUtil.Hex(ImmutableArray<byte>)
overloaded method. [#614] - Added
BlockChain<T>.Contains(Block<T>)
method. [#630] - Added
BlockDownloadState.SourcePeer
property. [#636]
Behavioral changes
- Changed to send
Pong
before updating the message sender to the routing table whenPing
is received. [#566] - Improved performance of
StoreExtension.LookupStateReference<T>()
method. [#447, #545] - Added .NET Core 2.2 as a targeted framework. [#209, #561]
TurnClient.AcceptRelayedStreamAsync()
became to ignore disconnected connections. [#469]Swarm<T>.PreloadAsync()
became to ignore peers with lower tip. [#592]Swarm<T>
became to validate only stale peers. [#568, #593]Swarm<T>
became not to check cached peers immediately after removing peers from its routing table. Instead, it checks cached peers periodically. [#608]- Marked
Address
andHashDigest
as readonly. [#610] IceServer.CreateTurnClient()
became to throwArgumentException
when received invalid url. [#622]Swarm<T>
became to update peer table when receiving messages that are not related with Kademlia protocol. [#594, #627]Swarm<T>
became not to check least recently used peer every time when new peer is fetched. [#627]IAction
became guaranteed that the givenIActionContext.PreviousStates.GetState()
never throwsIncompleteBlockStatesException
. Instead, now it may calculate the incomplete states from the beginning if necessary. [#645]IStore.PutBlock<T>()
became to do nothing when it takes theBlock<T>
more than once. [#647]Swarm<T>.PreloadAsync()
became to try downloading blocks from all neighbor peers, even if any peer among them is unavailable to send blocks. [#636]
Bug fixes
- Fixed a bug where
Swarm<T>
had tried to update a peer infinitely when the peer is evicted from its table. [#566] - Fixed a bug where
Swarm<T>.AppendBlocksAsync()
re-requests blocks that already received when blockchain is empty. [#550, #562] - Fixed a bug that
Swarm<T>
had thrownSocketException
with a messageOperation on non-blocking socket would block
. [#405, #485] - Fixed a bug that accessed all blocks from the genesis block when a swap occurred. [#575]
- Fixed a bug that
Swarm<T>
had thrownInvalidBlockIndexException
during synchronizing with other reorganized peer. [#528, #576] - Fixed a bug where
Swarm<T>
does not render actions in blocks which are filled from other peers. [#579] - Fixed a bug where
Swarm<T>
renders actions in same block multiple times when reorg happens. [#579] LiteDBStore
became to guarantee atomicity of storing blocks. [#584]- Fixed a bug that
BlockChain<T>
had appended a block even if fails to evaluate. [#591] - Fixed a bug where
Swarm<T>
hadn't removed stale peers. [#568, #593, #602] - Fixed a bug that
TurnClient
had thrownIOException
when accepting connection through a TURN relay server. [#453, #599] - Fixed a bug that
KeyNotFoundException
occurred when sending a message through the TurnClient. - Fixed a bug where
BlockChain<T>.GetNextTxNonce
only returned the same nonce when transactions with an old nonce were staged. [#637] - Fixed a bug that
BlockChain<T>
had reset whenSwarm<T>.PreloadAsync()
fails. [#644] - Fixed bug that whole processes could halt when received an invalid type of message. [#628, #641]
- Fixed a bug that received blocks could not be processed if a branch point is a stale block. [#655]
Version 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>.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]
Version 0.5.3
Released on September 9, 2019.
Bug fixes
- Fix bug where
IAccountStateDelta.GetState()
hadn't returned proper state when the block action is evaluated. [#500]
Version 0.5.2
Released on August 29, 2019.
Bug fixes
- Fixed a bug that
Swarm<T>.PreloadAsync()
method had thrownLiteException
(or other exception depending onIStore
), which indicates a state reference is duplicate, wheretrustedStateValidators
is present and a miner tries to download precalculated states from a trusted peer. [#465, #474] - Fixed a bug tag
Swarm<T>.StartAsync()
sometimes had thrown an exception fromIStore
(e.g.,NullReferenceException
) during broadcasting transactions. [#352, #476]
Version 0.5.1
Released on August 28, 2019.
Bug fixes
- Fixed a bug that
ArgumentNullException
had been thrown when a blockchain, which consists of incomplete states (i.e., precalculated states downloaded from trusted peers), encounters a new branch so that reorg is made. [#454, #466] - Fixed a bug that unnecessarily received all blocks in multiple miner situations. [#457, #468]
Version 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]
Version 0.4.1
Released on July 11, 2019.
Bug fixes
- Fixed a bug where the
BlockChain<T>.GetStates()
method had not returned the latest state when there are multiple addresses. [#346]
Version 0.4.0
Released on July 8, 2019.
Backward-incompatible interface changes
Peer.AppProtocolVersion
became nullable to representPeer
whose version is unknown. [#280]- Added
IStore.ListAddresses()
method. [#272, #285] - Added
IStore.ListTxNonces()
method. [#272, #309, #310] - Removed
BlockChain<T>.GetNonce()
method. [#294] BlockChain<T>.StageTransactions
became to receiveIDictionary<Transaction<T>, bool>
instead ofISet<Transaction<T>>
. [#274, #297]IStore.StageTransactionIds()
method became to receiveIDictionary<TxId, bool>
instead ofISet<TxId>
. [#274, #297]IStore.IterateStagedTransactionIds()
method became to receivebool toBroadcast
which is whether to iterate only the TxId set to broadcast. [#274, #297]Swarm<T>.StartAsync()
method became to receivebroadcastTxInterval
(ormillisecondsBroadcastTxInterval
) parameter. [#274, #297]IStore
became to treat a "tx nonce" mere along
integer instead of a stack of block hashes. [#272, #307, #309, #310]IStore.IncreaseTxNonce<T>(string, Block<T>)
method was replaced byIStore.IncreaseTxNonce(string, Address, long)
method.- Removed
IStore.ForkTxNonce()
method. FileStore
became to occupy fewer bytes for storing tx nonces. This change broke file-level backward compatibility.
IStore
became possible to look up multiple state references in a stack. [#272, #307]- Removed
IStore.LookupStateReference<T>()
method. Instead, a newly added static classStoreExtension
provides an extension method of the same name. - Added
IStore.IterateStateReferences()
method.
- Removed
Swarm
became to have type parameterT
to represent an action type as like asBlockChain<T>
. [#324]Swarm<T>
constructor became to receiveBlockChain<T>
. [#324]- Methods in
Swarm<T>
that had taken a parameter ofBlockChain<T>
type became to neither longer takeBlockChain<T>
nor a generic method. Because theSwarm<T>
constructor takes it instead. [#324] Swarm<T>
does not implementICollection<Peer>
anymore. [#326]- Added
IStore.DeleteNamespace()
method. [#329] - Removed the
id
parameter from theBlockChain<T>
constructor, and it became to automatically detect an appropriateBlockChain<T>.Id
. [#279, #332]
Added interfaces
- Added
LiteDBStore
backend that uses LiteDB under the hood. [#269] - All
*Async()
methods belonging toTurnClient
class became to havecancellationToken
option. [#287] - Added a
Peer
constructor omittingappProtocolVersion
parameter to create aPeer
whose version is unknown. [#280] - Added
IncompleteBlockStatesException
class. [#272, #285] - Added
completeStates
option toBlockChain<T>.GetStates()
method. [#272, #285] - Added
BlockChain<T>.MakeTransaction(PrivateKey, IEnumerable<T>, IImmutableSet<Address>, DateTimeOffset?)
method. [#294] - Added
BlockChain<T>.GetNextTxNonce()
method which counts staged transactions too during nonce computation. [#270, #294] - Added
StoreExtension
static class. [#272, #307] - Added
Swarm<T>.BlockChain
property. [#272, #343]
Behavioral changes
BlockChain<T>.GetStates()
method became to throwIncompleteBlockStatesException
if itsStore
lacks the states of a block that a requested address lastly updated. [#272, #285]- A message
Swarm<T>
makes became to have multiple blocks within it, which means round trips on the network are now much reduced. [#273, #276] Message.Block
has been replaced byMessage.Blocks
and the magic number has been changed to0x0a
. [#276]- Improved performance of
Swarm<T>
's response time toGetBlockHashes
request messages. [#277] - Added IPv6 support to
Libplanet.Stun.StunAddress
. [#267, #271] IStore.GetBlockStates()
became able to returnnull
to represent an absence of states (i.e., incomplete states). [#272, #285]Swarm<T>
became to broadcast stagedTransaction
s periodically so that game apps no more need to maintain their own thread to broadcast staged transactions. [#274, #297]- Previously,
Swarm<T>
had sent an emptyGetTxs
message when it receives an emptyTxIds
from peers, and it had made the network waste bandwidth for unnecessary messages.Swam<T>
became to no more send such emptyGetTxs
. [#297] BlockChain<T>.Swap()
became to delete an index, tx nonces, and state references in the replaced chain. [#329]- Reduced the memory footprint of
BlockChain<T>.FindBranchPoint()
method under the circumstances that the height of theBlockChain<T>
object is high. [#282, #299]
Bug fixes
- Fixed a bug that
Swarm<T>
reportedTaskCanceledException
as an unknown exception while stopping. [#275] - Fixed a bug that
Swarm<T>
didn't stop properly duringSwarm<T>.PreloadAsync()
. [#275] - Fixed a bug where the oldest
TxNonce
of an address is not invalidated when forking usingFileStore.ForkTxNonce()
method. [#281] - Fixed a bug where
LiteDBStore.GetTxNonce()
method throws aSystem.IO.IOException
after forking. [#281] - Fixed a bug that
TurnClient
had not stopped properly. [#287] - Fixed a bug that
TurnClient
had been trying to use an already closed connection. [#303, #308] - Fixed a bug that
KeyNotFoundException
had been thrown instead ofArgumentOutOfRangeException
whenBlockchain<T>[int]
called while the index of a block that does not exist locally. [#208, #317] - Fixed a bug that
Swarm<T>
had not dial to other peer afterSwarm<T>.PreloadAsync()
. [#311] - Fixed an issue where unknown exceptions occurred when
Swarm<T>
receiving a message. [#321, #327]
Version 0.3.0
Released on May 31, 2019.
Backward-incompatible interface changes
- Added
IAction.Render(IActionContext, IAccountStateDelta)
method. [#31, #212] - Added
IAction.Unrender(IActionContext, IAccountStateDelta)
method. [#31, #212] BlockChain<T>.Validate()
method became to receiveIReadOnlyList<Block<T>>
instead ofIEnumerable<Block<T>>
. [#205]IBlockPolicy<T>.GetNextBlockDifficulty()
method became to receiveIReadOnlyList<Block<T>>
instead ofIEnumerable<Block<T>>
. [#205]- Added
IBlockPolicy<T>.ValidateNextBlock(IReadOnlyList<Block<T>>, Block<T>)
method. [#210] - Removed
IBlockPolicy<T>.ValidateBlocks()
method. [#210] BlockChain<T>[int]
became to throwArgumentOutOfRangeException
instead ofIndexOutOfRangeException
. [#210]- Removed
KeyEquals()
methods from all classes and structs. [#216] Swarm
class now does not implementIEquatable<Swarm>
anymore and itsEquals(object)
method andGetHashCode()
method became to have default behavior ofobject
class. [#216]- Also,
Swarm
class now does not implementIDisposable
too. ThusSwarm.Dispose()
was removed too. [#218] Swarm
became to use a queue to maintain internal messages. [#218]- The broadcasting methods are no more
async
, so they are renamed as below.Swarm.BroadcastBlocksAsync()
→Swarm.BroadcastBlocks()
Swarm.BroadcastTxsAsync()
→Swarm.BroadcastTxs()
- The broadcasting methods are no more
- The type of
Block<T>.Difficulty
is changed tolong
instead ofint
, and related classes method parameters and field types have changed accordingly. - Removed
HashDigest.HasLeadingZeroBits()
method. [#213] - The signature of
IStore.PutBlock<T>(Block<T>)
method was changed toPutBlock<T>(Block<T>, Address)
. [#189, #197] Block<T>.Hash
is no longer calculated using the full data of theTransaction<T>
, but is calculated using only theTransaction<T>.Id
. [#234]- Added
IStore.LookupStateReference<T>(string, Address, Block<T>)
method. [#232] - Added
IStore.StoreStateReference<T>(string, Block<T>)
method. [#232] - Added
IStore.ForkStateReferences<T>(string, string, Block<T>, IImmutableSet<Address>
method. [#232] - Removed
Block<T>.Validate()
andBlock<T>.EvaluateActions()
method. [#243] - Added
Transaction<T>.Nonce
andRawTransaction.Nonce
properties. [#246] - Added
IStore.GetTxNonce(string, Address)
method. [#246] - Added
IStore.IncreaseTxNonce<T>(string, Block<T>)
method. [#246] - Added
IStore.ForkTxNonce<T>(string, string, Block<T>, IImmutableSet<Address>
method. [#246]
Added interfaces
BlockChain<T>
became to implementIReadOnlyList<Block<T>>
. [#205]- Added
Swarm.DifferentVersionPeerEncountered
event handler that can handle events when a different version of a peer is discovered. [#167], [#185] - Added
Peer.AppProtocolVersion
property. [#185] - Added
Swarm.PreloadAsync()
method to explicitly and preemptively download initial blocks beforeSwarm.StartAsync<T>()
being called. [#204], [#206] - Added
BlockDownloadState
class to represent a block downloading state. [#204], [#206] - Added
BlockPolicyExtension.ValidateBlocks<T>(IBlockPolicy<T>, IReadOnlyList<Block<T>>, DateTimeOffset)
method. [#210] - Added
Transaction<T>.EvaluateActionsGradually(HashDigest<SHA256>, long, IAccountStateDelta, Address, bool)
method. [#31, #212] - Added
Block<T>.EvaluateActionsPerTx(AccountStateGetter)
method. [#31, #212] - Added
HashDigest.Satisfies()
method. [#213] BlockPolicy<T>
constructor became to receive theminimumDifficulty
and the miningdifficultyBoundDivisor
. [#213]- Added
BlockChain<T>.UnstageTransactions()
method. [#223] Swarm
constructor became to receive alinger
(ormillisecondsLinger
) parameter. This purposes to determine how long to wait for pending messages when aSwarm
instance is requested to terminate.- Added
NamespaceNotFoundException
class. [#232] - Added
Block<T>.Evaluate()
method. [#243] - Made
InvalidBlockTimestampException
classpublic
so that it can be caught. [#133, #251] - Added
InvalidTxNonceException
class. [#246]
Behavioral changes
Swarm.StartAsync()
now receives the height of blocks (tipIndex
) from other known peers and synchronizes the blocks if necessary before propagating/receiving pinpointed recent blocks to prevent inefficient round-trips. [#187, #190]- The calculation algorithm of
BlockPolicy<T>.GetNextBlockDifficulty()
method was changed to the Ethereum Homestead algorithm except for the difficulty bomb. [#213] - The difficulty was changed from representing the number of leading zeros of target number to representing a divisor to obtain the target number. [#213]
BlockSet<T>[int]
changed so as not to validate a block. [#231]- Improved read performance of
Block<T>.Hash
andTransaction<T>.Id
. [#228, #234] Swarm.StartAsync()
now does not callSwarm.StopAsync()
anymore, thereforeSwarm.StopAsync()
should be explicitly called. [#236]Transaction<T>.EvaluateActionsGradually()
became to recordIAccountStateDelta.SetState()
calls even if its argument is the same to the previous state. [#241]Block<T>.Validate()
andBlock<T>.EvaluateActions()
are integrated intoBlock<T>.Evaluate()
. [#243]BlockChain<T>.Append()
became to executeAction.Execute()
only once per action in theBlock<T>
. [#243]BlockChain<T>.Append()
method became to throwInvalidTxNonceException
when theTransaction<T>.Nonce
does not correspond to itsSigner
's current nonce. [#246]Swarm
became to enforceForceDotNet.Force()
in AsyncIO while it's running on Mono runtime. [#247]
Bug fixes
- Fixed a bug that TURN relay had been disconnected when being connected for longer than 5 minutes. [#198]
- Fixed a bug that
Swarm
had attempted to use TURN relay even if thehost
argument was given. [#198] - Improved the read throughput of
BlockChain<T>.Append()
. - Improved overall read throughput of
BlockChain<T>
while blocks are being mined byBlockChain<T>.MineBlock()
. [#191] - Fixed a bug that
TurnClientException
had been thrown by Swarm when a STUN nonce is stale. [#193] - Fixed
BlockChain<T>.GetStates()
had descended to the bottom (i.e., the genesis block) where a givenAddress
refers to a nonexistent account (i.e., never used before). [#189, #192] - Fixed a bug that a TURN connection had turned unavailable after it once failed to parse a message (due to a corrupted packet). [#215]
- Instead of validating the entire blocks,
BlockChain<T>.Append()
method became to validate only the next block to be appended. [#210] - Improved
BlockChain<T>.Fork()
performance by avoiding double validation of already validated blocks. [#215] - Removed unnecessary writer locks on
BlockChain<T>.StageTransactions()
. [#217] - Improved concurrency of
BlockChain<T>.Append()
method by removing unnecessary race conditions. [#217] - Fixed a bug that
Swarm
could not properly communicate withPeer
behind NAT. [#240] - Fixed a bug that
BlockChain<T>.FindNextHashes()
throwsArgumentOutOfRangeException
when chain is empty. - Fixed a bug that
TurnClient.AcceptRelayedStreamAsync()
didn't handle concurrent connections correctly. [#256]
Version 0.2.2
Released on April 12, 2019.
- Fixed a bug that
BlockChain<T>.GetStates()
had returned slower than necessary for many addresses. [#189, #192]
Version 0.2.1
Released on April 7, 2019.
This version purposes to entirely replace 0.2.0, because a wrong .nupkg file was uploaded to 0.2.0 on NuGet Gallery. Note that 0.2.0 on NuGet Gallery was unlisted.
Version 0.2.0
Released on April 5, 2019.
PrivateKey.Decrypt()
now throws anInvalidCiphertextException
instead of returningnull
whencipherText
is invalid. [#140]Transaction<T>
'sSender
–Recipient
model was replaced bySigner
–UpdatedAddresses
model. Unlike cryptocurrencies, transactions in games are not necessarily a transfer of assets, so it is difficult to determine what type of assert is transferred or who will receives the asset. A more useful perspective is, like what kind of transformation is performed, or what states are changed. To be close to this perspective, we decided to get rid ofTransaction<T>.Recipient
(which is singular) and haveTransaction<T>.UpdatedAddresses
(which is plural) instead. As there is no more asset to transfer, the termSender
was also renamed toSigner
, which fits more to the new perspective. [#121]- Renamed
Transaction<T>.Sender
,RawTransaction.Signer
, andIActionContext.From
properties toSigner
. The corresponding parameter names on constructors and methods were also renamed too. - Old
Transaction<T>.Make()
factory method is replaced by newTransaction<T>.Create()
factory method. Thetimestamp
parameter became optional, and the new optionalupdatedAddresses
parameter was added. - Removed
IActionContext.To
property. Transaction<T>.Recipient
andRawTransaction.Recipient
properties were replaced byTransaction<T>.UpdatedAddresses
andRawTransaction.UpdatedAddresses
properties. The corresponding parameter names on constructors and methods were replaced too.- Since the schema of
RawTransaction
class was changed, the serialization format of transactions and blocks were also changed. It affects to the way to generateTransaction<T>.Signature
,Transaction<T>.Id
, andBlock.Hash
values as well. - Added
InvalidTxUpdatedAddressesException
exception class. - A nullary overload of
Block<T>.Validate()
method was gone so that the block validation API is always time-wise. Instead,Block<T>.Validate()
method now has only one overload:Validate(DateTimeOffset, AccountStateGetter)
returningIAccountStateDelta
. Block<T>.Validate()
andBlockChain<T>.Validate()
methods now can throw anInvalidTxUpdateAddressesException
.
- Renamed
The
Address
esIAction
tries to update no more need to be manually coded usingIAction.RequestStates()
method. That method was removed at all, and updatedAddress
es became automatically determined (for the most cases) by track "dirties" on rehearsal mode. This mode dry-runsIAction
s with emptyIActionContext.PreviousStates
. [#121]- Added
AccountStateGetter
delegate to provide a read-only view to account states. - Added
IAccountStateDelta
interface to replaceAddressStateMap
. The interface purposes to provide a read-write view to account states with maintainingUpdatedAddresses
(so-called "dirty"). [#98] - The type of
IActionContext.PreviousStates
property was changed fromAddressStateMap
toIAccountStateDelta
. - Added
IActionContext.Rehearsal
property. [#131, #135] - Added
UnexpectedlyTerminatedTxRehearsalException
class. [#132, #136] - The return type of
IAction.Execute()
method was changed fromAddressStateMap
toIAccountStateDelta
. - Removed
IAction.RequestStates()
method because there is no need for it and thus it is not used anymore. - Added
Transaction<T>.EvaluateActions()
method. - Added
Block<T>.EvaluateActions()
generator method.
- Added
The built-in subtype polymorphism of
IAction
andTransaction<T>
was moved to a separated newPolymorphicAction<T>
abstract class. Polymorphic actions now should be wrapped byPolymorphicAction<T>
. For example, the following code:public abstract class AbstractAction : IAction { ... } [ActionType("attack")] public sealed class Attack : AbstractAction { ... } [ActionType("sleep")] public sealed class Sleep : AbstractAction { ... }
var tx = Transaction<AbstractAction>.Create( ..., actions: new[] { new Attack(...), ... } );
should be changed to like:
var tx = Transaction<PolymorphicAction<AbstractAction>>.Create( ..., actions: new[] { new PolymorphicAction<AbstractAction>(new Attack(...)), ... } );
It can be simpler by implicit casting:
var tx = Transaction<PolymorphicAction<AbstractAction>>.Create( ..., actions: new PolymorphicAction<AbstractAction>[] { new Attack(...), } );
[#169]
- The type parameter
T
ofTransaction<T>
,Block<T>
, andBlockChain<T>
became to require having apublic
parameterless constructor (i.e.,new()
) besides implementingIAction
interface. This means anabstract class
or aninterface
no more can be passed toT
, but only a concreteclass
or astruct
can be passed.
- The type parameter
Fixed a bug that mutating a collection of
IAction
s passed to constructors or factory methods ofTransaction<T>
had affected made instances as well. The type ofTransaction<T>.Actions
property was changed fromIList<T>
toIImmutableList<T>
. The corresponding parameters on constructors and factory methods also were changed to takeIEnumerable<T>
instead ofIList<T>
.InvalidTxException
and its subclasses became to haveTxId
property and the corresponding constructor parameter. This can be useful when multipleTransaction<T>
objects are validated at once.Added
Address.Size
constant, which is fixed to theInt32
20.Fixed a bug that
Block<T>.Validate()
had not thrownInvalidTxException
even if there is any integrity error on itsTransactions
.Improved the write throughput of
BlockChain<T>
while pollingBlockChain<T>.GetStates()
Swarm.AddPeersAsync()
was fixed so that unreachablePeer
s are ignored. [#128]Swarm
became able to relay their connection via TURN (RFC 5766) to NAT traversal. To enable this, its constructor (Swarm()
) takes the newly addedIceServer
s as configuration.Since we decided to depend on TURN (RFC 5766) and STUN (RFC 5389) to work around NAT so that
Peer
's endpoints don't have to be multiple,Peer.Urls
was renamed toPeer.EndPoint
and its type also was changed fromIImmutableList<Uri>
toDnsEndPoint
. [#120, #123 by Yang Chun Ung, #126, #127, #165, #166]Swarm
became to ignore tip blocks of the same height (Index
) that it already has and deal with only longer (higher) blocks.Fixed a bug that occurred when
Swarm
was handling multiple responses at the same time.Fixed a bug that the
Swarm
constructor had hanged in certain runtimes like Unity engine.Removed
AddressTransactionSet
which handles handleAddress
toIEnumerable<TxId>
indices, and the following methods inIStore
:IStore.IterateAddresses()
IStore.GetAddressTransactionIds()
IStore.AppendAddressTransactionId()
IStore.CountAddresses()
Added
IStore.ListNamespaces()
method.IStore.CountBlocks()
andIStore.CountTransactions()
became to returnlong
.Block/tx-related methods in
IStore
andBaseIndex<T>
no longer accepts@namespace
parameter. It means that even if a forking occurs, the same block/tx files are shared.Fixed a bug that made unnecessary fork when receiving blocks from other peer.
Action classes that implement
IAction
but lackActionTypeAttribute
became reported byPolymorphicAction<T>
throwingMissingActionTypeException
at runtime. [#28, #144, #169]Turn into parameter in
BlockPolicy
's constructor to milliseconds. [#151]BencodexFormatter
became able to serializeBigInteger
. [#159]Made
Swarm
possible to configure its networkappProtocolVersion
and, to ignore peers if their version is different. [#167], [#170]Added
DifferentAppProtocolVersionException
class. [#167, #170]Renamed
Block<T>.RewardBeneficiary
toBlock<T>.Miner
. [#174]Added
BlockChain<T>.Blocks
property. [#176]Added
BlockChain<T>.Transactions
property. [#176]
Version 0.1.1
Released on March 5, 2019.
- Improved stability of
Swarm
andSwarmTest
.
Version 0.1.0
Initial release. Released on February 26, 2019.