Libplanet changelog
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][Bencodex 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]