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> validateMessageToReceiveparameter toGossip's constructor. [#3273] - Added
Action<MessageContent> validateMessageToSendparameter toGossip's constructor. [#3273] - Removed
Action<Message> validateMessageparameter fromGossip's constructor. [#3273] - Removed
AccountStateGetter,AccountBalanceGetter,TotalSupplyGetter, andValidatorSetGetterdelegates. [#3282] - Removed
IFeeCalculatorinterface. [#3283] - Removed
IBlockPolicy.FeeCalculatorinterface property. [#3283] - Removed
TxExecution.ActionsLogsList,TxFailure.ActionsLogsList, andTxSuccess.ActionsLogsListproperties. [#3291] - (Libplanet.Explorer) Removed
TxResult.ActionsLogsListproperty. [#3291] - Removed
IActionContext.Logsproperty andIActionContext.PutLog()method. [#3292] - Removed
IActionEvaluation.Logsproperty. [#3292]
Added APIs
- Added
VoteSetBitsand its related classes. [#3206]- Added
VoteSetBitsclass. - Added
VoteSetBitsMetadataclass. - (Libplanet.Net) Added
ConsensusVoteSetBitsMsgclass.
- Added
- Added
ProposalClaimand its related class. [#3206]- Added
ProposalClaimclass. - Added
ProposalClaimMetadataclass. - (Libplanet.Net) Added
ConsensusProposalClaimMsgclass.
- Added
- (Libplanet.Net) Added
ConsensusMaj23Msgclass. [#3206] - (Libplanet.Net) Added enumeration items to
MessageTypeenum. [#3206]- Added
ConsensusMaj23Msgof value0x53. - Added
ConsensusVoteSetBitsMsgof value0x54. - Added
ConsensusProposalClaimMsgof value0x55.
- Added
- Added
IActionContext.Logsinterface property. [#3274] - Changed the type for
IActionEvaluation.LogstoIReadOnlyList<string>fromList<string>. [#3274] - Changed the type for
TxExecution.ActionsLogListtoList<IReadOnlyList<string>>?fromList<List<string>>?. [#3274] - (Libplanet.Explorer) Changed the type for
TxResult.ActionsLogListtoList<IReadOnlyList<string>>?fromList<List<string>>?. [#3274] - (Libplanet.Explorer) Added
BlockType.PreEvaluationHashfield. [#3280, #3281] - (Libplanet.Net) Added
VoteSet.GetAllVotes()method. [#3288]
Behavioral changes
- (Libplanet.Net)
Contextbecame to remove its proposal when +2/3 valid votes were collected. [#3206] - Changed
ActionEvaluatorto evaluate allIActions in aTransactionwithout early termination even if anIActionthrows anException. [#3272] Gossip.HandleMessageAsync()now executes_validateMessageToReceiveon given message received. [#3273]Gossip.SendWantAsync()now executes_validateMessageToReceiveon replies ofWantMessage. [#3273]Gossip.HandleWantAsync()now executes_validateMessageToSendon given message to send as a reply ofWantMessage. [#3273]GossipConsensusMessageCommunicatornow prevents sending a message with a round other than its own as a reply to aWantMessage. [#3273]GossipConsensusMessageCommunicatornow 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.BroadcastMessageproperty. [#3260]
Backward-incompatible API changes
Vote.BlockHashproperty becameBlockHashtype. (wasBlockHash?) [#3249]VoteMetadata(long, int, BlockHash?, DateTimeOffset, PublicKey, VoteFlag)constructor becameVoteMetadata(long, int, BlockHash, DateTimeOffset, PublicKey, VoteFlag)[#3249]- (Libplanet.Net) Renamed
Stepenum toConsensusStepto remove ambiguity. [#3249] - (Libplanet.Net)
ConsensusProposalMsg,ConsensusPreVoteMsgandConsensusPreCommitMsgbecame to inheritConsensusVoteMsg. [#3249] - (Libplanet.Net) Removed
ConsensusMsg.BlockHashproperty. [#3249] - (Libplanet.Net) Some enumeration items to
MessageTypeenum has modified. [#3249]ConsensusProposalchanged to0x50(was0x40).ConsensusVotechanged to0x51(was0x41).ConsensusCommitchanged to0x52(was0x42).
- (Libplanet.Net) Added
Flagproperty toConsensusVoteMsgabstract class. [#3260] - (Libplanet.Net)
ConsensusProposalMsgno longer inheritsConsensusVoteMsg. Instead, inheritsConsensusMsg. [#3260] - (Libplanet.Net) Added parameter
IConsensusMessageCommunicator consensusMessageCommunicatortoConsensusContext. [#3260] - (Libplanet.Net) Removed parameter
DelegateBroadcastMessage broadcastMessagefromConsensusContext. [#3260] - (Libplanet.Net) Added parameter
IConsensusMessageCommunicator consensusMessageCommunicatortoContext. [#3260] - (Libplanet.Net) Renamed
Context.BroadcastMessage(ConsensusMsg)asContext.PublishMessage(ConsensusMsg). [#3260] - (Libplanet.Net) Removed constructor of
MessageCacheclass. [#3260] - (Libplanet.Explorer) Changed
TxResult.UpdatedStates's type toIImmutableDictionary<Address, IValue>fromIImmutableDictionary<Address, IValue?>. [#3262]
Added APIs
- Added
Maj23and its related classes. [#3249]- Added
Maj23class. - Added
Maj23Metadataclass.
- Added
- (Libplanet.Net) Added
VoteSetclass. [#3249] - (Libplanet.Net) Added
HeightVoteSetclass. [#3249] - (Libplanet.Net) Added
ConsensusVoteMsgabstract class. [#3249] - (Libplanet.Net) Added
InvalidProposalExceptionclass. [#3249] - (Libplanet.Net) Added
InvalidVoteExceptionclass. [#3249] - (Libplanet.Net) Added
InvalidMaj23Exceptionclass. [#3249] - Added
IAccountDelta.OrderedSum()extension method. [#3256] - Added
IAccountDelta.ToRawDelta()extension method. [#3256] - Removed several properties from
IAccountStateDeltapertaining to the delta part ofIAccountStateDelta. Access the equivalent data throughIAccountStateDelta.Deltainstead. [#3257]- Removed
IAccountStateDelta.UpdatedAddressesproperty. - Removed
IAccountStateDelta.StateUpdatedAddressesproperty. - Removed
IAccountStateDelta.UpdatedFungibleAssetsproperty. - Removed
IAccountStateDelta.UpdatedTotalSupplyCurrenciesproperty.
- Removed
- Changed
IBlockStatestoIBlockState. [#3259] - Changed
IBlockChainStates.GetBlockStates()toIBlockChainStates.GetBlockState(). [#3259] - Changes
IActionContext.PreviousStatestoIActionContext.PreviousState. - Changed
IActionEvaluation.OutputStatestoIActionEvaluation.OutputState. [#3259] - (Libplanet.Net) Added
IConsensusMessageCommunicatorinterface and its related classes. [#3260]- (Libplanet.Net) Added
GossipConsensusMessageCommunicatorclass. [#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)
Gossipnow 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 consensus
any more. Instead, logic change on
Gossipsolves 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
SystemActionandCustomActionwas removed since 1.1.0 and some system actions were removed since 1.2.0. [#3230]- Removed
encodeUnsignedTxWithCustomActions()function. - Removed
encodeUnsignedTxWithSystemAction()function. - Removed
UnsignedTxWithCustomActionstype. - Removed
UnsignedTxWithSystemActiontype. - Removed
encodeMint()function. - Removed
encodeTransfer()function. - Removed
encodeSystemAction()function. - Removed
CustomActiontype. - Removed
SystemActiontype. - Removed
Minttype. - Removed
Transfertype. - Added
encodeUnsignedTx()function. - Added
UnsignedTxtype. 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.UpdatedFungibleAssetstoIImmutableSet<(Address, Currency)>fromIImmutableDictionary<Address, IImmutableSet<Currency>>. [#3244] - Changed the type for
IAccountStateDelta.TotalUpdatedFungibleAssetstoIImmutableSet<(Address, Currency)>fromIImmutableDictionary<Address, IImmutableSet<Currency>>. [#3244] - Added
IAccountStateDelta.Deltaproperty. [#3245] - Removed
IValidatorSupportStateDeltainterface. [#3247] - Added
IAccountStateDeltaView.GetValidatorSet()interface method. [#3247] - Added
IAccountStateDelta.SetValidator()interface method. [#3247] - Changed the name
IAccountStateDelta.TotalSupplyUpdatedCurrenciestoIAccountStateDelta.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
IBlockStatesto inheritIAccountStateinterface. [#3251]
Added APIs
- Added
IAccountDeltainterface and its default implementationAccountDeltaclass. [#3245]
Version 2.2.0
Released on June 23, 2023.
Backward-incompatible API changes
- Added
BlockProtocolVersionproperty toIActionContext. [#3228] - Changed
IAccountStateDelta.TransferAsset()to require additionalIActionContextparameter. [#3229] - Changed
IAccountStateDelta.MintAsset()andIAccountStateDelta.BurnAsset()to each require an additionalIActionContextparameter. [#3231]
Bug fixes
- Fixed a bug where
IActionContext.BlockProtocolVersionwas 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
IBlockChainStatesmethods now take nullableBlockHash?instead ofBlockHashasoffsetparameter. [#3214] - Removed
IncompleteBlockStatesExceptionclass. [#3214] - Changed
BlockChain's implementation ofIBlockChainStatesto match interface description. [#3214] - Added
IBlockChainStates.GetBlockStates()interface method. [#3216]
Added APIs
- Added
IBlockStatesinterface and its default implementationBlockStates. [#3216]
Behavioral changes
- Improved performance of fungible asset APIs on default
IAccountStateDeltaimplementation. [#3218]
Bug fixes
- Fixed a bug where
BlockActioncould have unintendedAccountStateDeltaImpl.Signerduring its execution. [#3215]
Version 2.0.1
Released on June 22, 2023.
- (@planetarium/tx) Fixed a bug where an
encodeCurrencyserializedCurrencyin an incompatible way with Libplanet. [#3225]
Version 2.0.0
Released on June 14, 2023.
Backward-incompatible API changes
- Added
IAccountStateDelta.TotalUpdatedFungibleAssetsinterface property. [#3208] - Removed
blockActionparameter fromActionContext(). [#3209] - Added
ITransaction.MaxGasPriceproperty. [#3201] - Added
ITransaction.GasLimitproperty. [#3201] Currency.Serialize()'s behavioral is changed. the serialize field is replaced. [#3201]
Added APIs
- Added
FungibleAssetValue.Serialize()method. [#3201]