libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming

LGPL-2.1 License

Downloads
10.1K
Stars
489
Committers
79

Bot releases are visible (Hide)

libplanet - Libplanet 0.15.4

Published by github-actions[bot] about 3 years ago

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]
libplanet - Libplanet 0.15.3

Published by github-actions[bot] about 3 years ago

Released on September 10, 2021.

  • Fixed a bug where Swarm<T> fails to reply transaction when any of the requested transactions id in GetTxs message does not exist in the storage. [#1481]
libplanet - Libplanet 0.15.1

Published by github-actions[bot] about 3 years ago

Released on August 28, 2021.

  • NetMQTransport became to process message in non blocking way. [#1451]
libplanet - Libplanet 0.16.0

Published by github-actions[bot] about 3 years ago

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

  • Swarm<T> became to sync blocks from multiple peers. [#1419, #1425]

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]

CLI tools

libplanet - Libplanet 0.15.0

Published by github-actions[bot] about 3 years ago

Released on August 18, 2021.

Backward-incompatible API changes

  • Added IRandom.Seed property. [#1431]
libplanet - Libplanet 0.14.1

Published by github-actions[bot] about 3 years ago

Released on Aug 18, 2021.

  • Added additional tags to logging. [#1433]
libplanet - Libplanet 0.14.0

Published by github-actions[bot] about 3 years ago

Released on Aug 5, 2021.

Added APIs

  • Added NonblockRenderer<T> class. [#1402, #1422]
  • Added NonblockActionRenderer<T> class. [#1402, #1422]
libplanet - Libplanet 0.13.2

Published by github-actions[bot] about 3 years ago

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]
libplanet - Libplanet 0.13.1

Published by github-actions[bot] about 3 years ago

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]
libplanet - Libplanet 0.13.0

Published by github-actions[bot] about 3 years ago

Released on July 28, 2021.

Backward-incompatible API changes

  • Added bool render = false option to Swarm<T>.PreloadAsync(). Blocks and actions in preloaded blocks will be rendered if the switch is set to true. [#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 throw InvalidTxSignatureException if the transaction was not signed. [#1378]

Bug fixes

  • Fixed a bug where Swarm<T> had stopped when ObjectDisposedException is thrown during NetMQTransport.DoBroadcast(). [#1362, #1365]

CLI tools

libplanet - Libplanet 0.12.1

Published by github-actions[bot] about 3 years ago

Released on July 28, 2021.

  • Swarm<T>.PreloadAsync() now checks the existence of blocks in the storage (was in the blockchain). [#1324]
libplanet - Libplanet 0.12.0

Published by github-actions[bot] about 3 years ago

Released on July 23th, 2021.

Backward-incompatible API changes

  • Block hashes are now represented as BlockHash, which was introduced in this release, which has been done as HashDigest<SHA256>. [#1192, #1197]
    • The type of Block<T>.Hash property became BlockHash (was HashDigest<SHA256>).
    • The type of Block<T>.PreviousHash property became BlockHash? (was HashDigest<SHA256>?).
    • The types of Block<T>() constructors' hash parameter became BlockHash (were HashDigest<SHA256>).
    • The types of Block<T>() constructors' previousHash parameter became BlockHash? (were HashDigest<SHA256>?).
    • The type of Block<T>.Mine() method's previousHash parameter became BlockHash? (was HashDigest<SHA256>?).
    • The return type of HashCash.Hash() method became BlockHash (was HashDigest<SHA256>).
    • The type of Transaction<T>() constructor's genesisHash parameter became BlockHash? (was HashDigest<SHA256>?).
    • The type of Transaction<T>.Create() method's genesisHash parameter became BlockHash? (was HashDigest<SHA256>?).
    • The type of Transaction<T>.GenesisHash property became BlockHash? (was HashDigest<SHA256>?).
    • The type of Transaction<T>.EvaluateActionsGradually() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of Transaction<T>.EvaluateActions() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of BlockChain[] indexer's parameter became BlockHash (was HashDigest<SHA256>).
    • The type of BlockChain.BlockHashes property became IEnumerable<BlockHash> (was IEnumerable<HashDigest<SHA256>>).
    • The type of BlockChain.ContainsBlock() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of BlockChain.GetState() method's offset parameter became BlockHash? (was HashDigest<SHA256>?).
    • The type of BlockChain.GetBalance() method's offset parameter became BlockHash? (was HashDigest<SHA256>?).
    • The type of StateCompleter<T> delegate's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of FungibleAssetStateCompleter<T> delegate's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • BlockSet<T> no more implements IDictionary<HashDigest<SHA256>, Block<T>>, but now implements IDictionary<BlockHash, Block<T>>.
    • The type of ActionExecutionState.ExecutedBlockHash property became BlockHash (was HashDigest<SHA256>).
    • The type of BlockDownloadState.ReceivedBlockHash property became BlockHash (was HashDigest<SHA256>).
    • The type of BlockVerificationState.VerifiedBlockHash property became BlockHash (was HashDigest<SHA256>).
    • The type of IncompleteBlockStatesException() constructor's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IncompleteBlockStatesException.BlockHash property became BlockHash (was HashDigest<SHA256>).
    • The types of InvalidGenesisBlockException() constructor's networkExpected and stored parameters became BlockHash (were HashDigest<SHA256>).
    • The type of InvalidGenesisBlockException.NetworkExpected property became BlockHash (was HashDigest<SHA256>).
    • The type of InvalidGenesisBlockException.Stored property became BlockHash (was HashDigest<SHA256>).
    • The type of InvalidTxGenesisHashException() constructor's expectedGenesisHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of InvalidTxGenesisHashException() constructor's improperGenesisHash parameter became BlockHash? (was HashDigest<SHA256>?).
    • The type of InvalidTxGenesisHashException.ExpectedGenesisHash property became BlockHash (was HashDigest<SHA256>).
    • The type of InvalidTxGenesisHashException.ImproperGenesisHash property became BlockHash? (was HashDigest<SHA256>?).
    • The return type of IStore.IndexBlockHash() method became BlockHash? (was HashDigest<SHA256>?).
    • The type of IStore.AppendIndex() method's hash parameter became BlockHash (was HashDigest<SHA256>).
    • Replaced IStore.ForkBlockIndexes() method's HashDigest<SHA256> branchPoint parameter with BlockHash branchpoint.
    • The return type of IStore.IterateIndexes() method became IEnumerable<BlockHash> (was IEnumerable<HashDigest<SHA256>>).
    • The return type of IStore.IterateBlockHashes() method became IEnumerable<BlockHash> (was IEnumerable<HashDigest<SHA256>>).
    • The type of IStore.GetBlock<T>() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IStore.GetBlockIndex() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IStore.GetBlockDigest() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IStore.DeleteBlock() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IStore.ContainsBlock() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IStateStore.GetState() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of IStateStore.ContainsBlockStates() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of TrieStateStore.GetRootHash() method's blockHash parameter became BlockHash (was HashDigest<SHA256>).
    • The type of TrieStateStore.PruneStates() method's excludeBlockHashes parameter became IImmutableSet<BlockHash> (was ImmutableHashSet<HashDigest<SHA256>>).
  • Hash algorithm for PoW (Hashcash) became configurable. #1314, #1352
    • Added IBlockPolicy<T>.GetHashAlgorithm() method.
    • Added an optional HashAlgorithmType? hashAlgorithm parameter to Block<T>(long, long, BigInteger, Nonce, Address?, BlockHash?, DateTimeOffset, IReadOnlyList<Transaction<T>>, ImmutableArray<byte>?, HashDigest<SHA256>?, int protocolVersion) constructor.
    • Added HashAlgorithmType hashAlgorithm parameter to Block<T>.MineBlock() method.
    • The type of Block<T>.PreEvaluationHash property became ImmutableArray<byte>? (was HashDigest<SHA256>?). [#1192, #1197]
    • The types of Block<T>() constructors' preEvaluationHash parameter became ImmutableArray<byte>? (were HashDigest<SHA256>?). [#1192, #1197]
    • The type of InvalidBlockPreEvaluationHashException.ActualPreEvaluationHash and ExpectedPreEvaluationHash properties became ImmutableArray<byte> (were HashDigest<SHA256>). [#1192, #1197]
    • The type of InvalidBlockPreEvaluationHashException() constructor's actualPreEvaluationHash and and expectedPreEvaluationHash parameters became ImmutableArray<byte> (were HashDigest<SHA256>). [#1192, #1197]
    • Replaced UnexpectedlyTerminatedActionException() constructor's HashDigest<SHA256>? blockHash parameter with ImmutableArray<byte>? preEvaluationHash. [#1192, #1197]
    • Replaced UnexpectedlyTerminatedActionException.BlockHash property with PreEvaluationHash. [#1192, #1197]
    • Replaced Hashcash.Answer(Stamp, long, CancellationToken) method with Hashcash.Answer<T>(Stamp, HashAlgorithm, long, CancellationToken) method.
    • Removed Hashcash.Hash() method.
    • Removed HashDigest<T>.Satisfies() method. This was replaced by ByteUtil.Satisfies() method instead. [#1192, #1197]
    • Added hashAlgorithmGetter parameter to BlockSet<T>() constructor.
    • Added hashAlgorithm parameter to BlockChain<T>.MakeGenesisBlock() method.
    • Added an optional hashAlgorithmGetter parameter to BlockPolicy<T>() constructor.
  • 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 from IStateStore.GetState() method. [#1289]
  • Removed compress parameter from DefaultStore() constructor. [#1289]
  • Removed statesCacheSize parameter from DefaultStore() constructor. [#1289]
  • Removed StunMessage.Parse(Stream) method. [#1228]
  • Moved ITransport and NetMQTransport from Libplanet.Net to Libplanet.Net.Transports. [#1235]
  • Block<T> now enforces a collection of Transaction<T>s to be less mutable. [#1274]
    • The type of Block<T>() constructor's transactions parameter became IReadOnlyList<T> (was IEnumerable<T>).
    • The type of Transactions property of Block<T> became IReadOnlyList<T> (was IEnumerable<T>).
  • Types of following properties became IReadOnlyList<T> (was IEnumerable<T>). [#1230, #1271]
    • RoutingTable.Peers
    • RoutingTable.PeerStates
    • Swarm<T>.Peers
    • Swarm<T>.PeerStates
  • Return type of RoutingTable.Neighbors() became IReadOnlyList<BoundPeer> (was IEnumerable<BoundPeer>). [#1230, #1271]
  • All methods pertaining to evaluating IActions are moved to a new ActionEvaluator class. [#1301, #1305]
    • Removed Block<T>.Evaluate() method. Use ActionEvaluator.Evaluate() method instead.
    • Removed Block<T>.EvaluateActionsPerTx() method.
    • Removed Transaction<T>.EvaluateActionsGradually() method.
    • Removed Transaction<T>.EvaluateActions() method.
  • Parameters action, inputContext, and outputStates for ActionEvaluation() constructor can no longer be null. [#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 for Block<T>() and Block<T>.Mine() can no longer be null. [#1341]
  • Swarm<T>.StartAsync() method became to receive broadcastBlockInterval (or millisecondsBroadcastBlockInterval) parameter. [#1351]
  • Added the parameter minimumBroadcastTarget to NetMQTransport() constructor. [#1379]
  • Removed InvalidTxUpdatedAddressesException. [#368, #1389]

Backward-incompatible network protocol changes

Backward-incompatible storage format changes

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 a TxExecution for every single transaction in the appended Block<T>, whether a transaction is successful (TxSuccess is recorded for this case) or not (TxFailure is recorded for this case). [#1156, #1289]
  • ITransport.StartAsync() and ITransport.RunAsync() became to throw TransportException instead of SwarmException. [#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 by Swarm<T>, but as the ITransport is now separated from it, this became done by NetMQTransport instead of Swarm<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]
  • Block<T>.Transactions will be ordered using a different scheme once the protocol version is bumped to 2. [#1322, #1323, #1326]
  • ActionEvaluator<T>.EvaluateActions() now throws an unmanaged exception if OutOfMemoryException is caught from IAction.Execute(). [#1320, #1343]
  • Improved performance of broadcasting using Swarm<T>. [#1334]
  • Swarm<T> now maintains static peers provided via SwarmOptions.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 throw InvalidTxUpdatedAddressesException. [#368, #1389]

Bug fixes

  • Fixed a bug where executing Transaction<T>.Actions had not been atomic. Actions in a Transaction<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 of ActionEvaluations to Transaction<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 of ActionEvaluations to Transaction<T>.Actions.
    • State-wise, Transaction<T>s having any exception-throwing action now do not commit any changes at all to IStateStore.
    • Rendering-wise, for actions following the first exception-throwing action, action rendering methods in IActionRenderer<T> (RenderAction(), RenderActionError(), UnrenderAction(), and UnrenderActionError()) became not invoked. If you want to dismiss all actions in unsuccessful transactions at all, wrap your action renderer with AtomicActionRenderer<T>.
  • Fixed a bug where KademliaProtocol.BootstrapAsync() has sent multiple Ping messages to other peers. [#1219]
  • Fixed a bug where KademliaProtocol.CheckReplacementCacheAsync() has updated cached peers multiple times. [#1219]
  • Fixed memory leak due to undisposed CancellationTokenRegistrations. [#1228]
  • Fixed a bug where DefaultStore.Dispose() and TrieStateStore.Dispose() had not been idempotent. [#1272]
  • (Libplanet.RocksDBStore) Fixed a bug where RocksDBStore.Dispose(), MonoRocksDBStore.Dispose(), and RocksDBKeyValueStore.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>() and RocksDBStore.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 to planet 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 to planet 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]
libplanet - Libplanet 0.11.1

Published by github-actions[bot] over 3 years ago

Released on April 22th, 2021.

  • Fixed a bug where block synchronization had stopped due to internal errors. [#1259]
libplanet - Libplanet 0.11.0

Published by github-actions[bot] over 3 years ago

Released on March 30, 2021.

Backward-incompatible API changes

  • Added the parameter protocolVersion to Block<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 to Block<T>.Mine() method. [#1142, #1147, #1162]
  • Added the first parameter protocolVersion to BlockHeader() constructor. [#1142, #1147, #1162]
  • Added stagePolicy as the second parameter to BlockChain<T>() constructor. [#1130, #1131]
  • Added IBlockPolicy<T>.CanonicalChainComparer property to make the canonical chain. [#1155, #1165, #1184]
  • Added canonicalChainComparer as the last parameter to BlockPolicy() constructors. [#1155, #1165, #1184]
  • Added canonicalChainComparer as the second parameter to DelayedRenderer() constructor. [#1155, #1165, #1184]
  • Added canonicalChainComparer as the second parameter to DelayedActionRenderer() constructor. [#1155, #1165, #1184]
  • Added reorgResistantHeight parameter into DelayedActionRenderer<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 from Swarm<T>.PreloadAsync() method. [#1117]
  • Removed Swarm<T>.TraceTable() method. [#1120]
  • Added IActionContext.BlockAction property. [#1143]
  • Added nullable TimeSpan-typed messageLifespan parameter into NetMQTransport() 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 when Swarm<T> receives less than 500 blocks. [#1112]
  • The existing ChainStatus message type (with the type number 0x24) was replaced by a new ChainStatus message type (with the type number 0x25). [#1155, #1165]
  • Removed the message types depended on features of IBlockStatesStore interface. [#1117]
    • GetRecentStates message type (with the type number 0x0b)
    • RecentStates message type (with the type number 0x13)
    • GetBlockStates message type (with the type number 0x22)
    • BlockStates message type (with the type number 0x23)
  • Swarm<T> became to ignore messages made earlier than a certain amount of time, which is configured by SwarmOptions.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's txEpochUnitSeconds and blockEpochUnitSeconds parameters (86400 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 by RocksDBStore() constructor's dbConnectionCacheSize parameters (100 by default). [#1183, #1194]
  • (Libplanet.RockDBStore) The RocksDBStore that was previously used has been separated into a class called MonoRocksDBStore. 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 implement IBlockExceprt interface. [#1155, #1165, #1170]
  • BlockHeader became to implement IBlockExceprt interface. [#1155, #1165, #1170]
  • Added BlockPerception struct. [#1155, #1184]
  • Added BlockChain<T>.PerceiveBlock() method. [#1155, #1184]
  • Added DelayedRenderer<T>.CanonicalChainComparer and DelayedActionRenderer<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 implements ITransport. [#1052]
  • Added Message abstract class. [#1052]
  • Added BlockExceedingTransactionsException class. [#1104, #1110]
  • Added BlockChain<T>.GetStagedTransactionIds() method. [#1089]
  • (Libplanet.RocksDBStore) Added maxTotalWalSize, keepLogFileNum and maxLogFileSize parameters into RocksDBStore() 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 class
    • RenderRecord<T>.ActionSuccess class
    • RenderRecord<T>.ActionError class
    • RenderRecord<T>.BlockBase abstract class
    • RenderRecord<T>.Block class
    • RenderRecord<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 implements IProtocol. [#1120, #1135]
  • Added reorgResistantHeight parameters into DelayedActionRenderer<T>() constructor. [#1163]
  • Added InvalidBlockPreEvaluationHashException class. [#1148]
  • Added the parameter validate which is true by default, to Transaction<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> follows VolatileStagePolicy<T>, which is Libplanet's the only built-in IStagePolicy<T> implementation at the moment, as its StagePolicy, its staged transactions are no longer persistent but volatile instead. It also automatically purges staged transactions after the given Lifetime, 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 given Block<T> before storing its StateRootHash. [#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 call KademliaProtocol.RebuildConnectionAsync() right after Swarm<T>.StartAsync(). If you called Swarm<T>.BootstrapAsync() before Swarm<T>.StartAsync(), peers in your table may not have you in their table right after Swarm<T>.StartAsync() (which was almost guaranteed before). [#1208]
  • Peers added during Swarm<T>.BootstrapAsync() before Swarm<T>.StartAsync() are now marked as stale so that Swarm<T>.RefreshTableAsync() will update. [#1215]
  • Following classes became to leave log messages with its class as logging context. [#1218]
    • TrieStateStore class
    • TurnClient class
    • ActionEvaluation 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 CancellationTokenSources. [#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 like planet mpt diff STORE A B do not work anymore, and these should be instead like planet 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 and planet mpt query. [#1137]
libplanet - Libplanet 0.10.3

Published by github-actions[bot] over 3 years ago

Released on January 28, 2021.

  • BlockChain<T>.MineBlock() became to unstage transactions that have lower nonce than exepcted. [#1174]
  • Fixed a bug where Block<T>.Evaluate() hadn't validate its hash. [#1168, #1175]
libplanet - Libplanet 0.10.2

Published by github-actions[bot] almost 4 years ago

Released on November 25, 2020.

  • Fixed BlockChain<T>.Append() method's bug that it had accepted a Block<T> having more Transactions than the number specified by the IBlockPolicy<T>.MaxTransactionsPerBlock property. Now it throws InvalidBlockException instead for such case. [#1104]
libplanet - Libplanet 0.10.1

Published by github-actions[bot] almost 4 years ago

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 of IBlockStatesStore. [#1063]
  • Fixed a bug where Swarm<T>.GetPeerChainStateAsync() has thrown NullReferenceException when peers in table does failed to respond. [#1066]
  • Fixed a bug where BlockChain<T> had not locked readers–writer lock for state changes during MineBlock(). [#1077, #1087]
  • PolymorphicAction<T>.ToString() became more human-readable. [#1085, #1087]
  • Fixed a bug where MerkleTrie had had MrrkleTrie.EmptyRootHash as root node, which had been unable to insert new nodes. [#1087, #1091]
libplanet - Libplanet 0.10.0

Published by github-actions[bot] almost 4 years ago

Released on October 27, 2020.

Backward-incompatible API changes

  • Extracted rendering methods from IAction to IRenderer<T>, which is introduced in this version. From now on, rendering logic needs to be injected from outside through BlockChain<T>.Renderers, rather than IActions knowing how to render themselves. IRenderer<T> also unified BlockChain<T>.TipChanged event, and introduced new events like IActionRenderer<T>.RenderActionError(), IActionRenderer<T>.RenderBlockEnd(), IRenderer<T>.RenderReorg(), and IRenderer<T>.RenderReorgEnd(). [#860, #875, #959, #963]
    • Removed IAction.Render() method, which was replaced by IActionRenderer<T>.RenderAction().
    • Removed IAction.Unrender() method, which was replaced by IActionRenderer<T>.UnrenderAction().
    • Removed BlockChain<T>.TipChanged event, which was replaced by IRenderer<T>.RenderBlock().
    • Removed PolymorphicAction<T>.Render() and Unrender() methods.
    • Removed BlockChain<T>.TipChangedEventArgs class.
  • Added methods related fungible asset states to IAccountStateDelta: [#861, #900, #954]
    • UpdatedFungibleAssetsAccounts property
    • MintAsset(Address, Currency, BigInteger) method
    • TransferAsset(Address, Address, Currency, BigInteger) method
    • BurnAsset(Address, Currency, BigInteger) method
    • GetBalance(Address, Currency) method
  • Added IAccountStateDelta.StateUpdatedAddresses property in order to distinguish state updates from asset states. [#861, #900]
  • Added an optional parameter AccountBalanceGetter accountBalanceGetter to Block<T>.EvaluateActionsPerTx() method. [#861, #900]
  • BlockChain<T>.StageTransaction() became to throw InvalidTxGenesisHashException when it takes a Transaction<T> from a heterogeneous BlockChain<T> with a different genesis block. [#796, #878]
  • Added renderers optional parameter to BlockChain<T>() constructor. [#883, #959, #963]
  • Added BigInteger-typed totalDifficulty parameter to Block<T>() constructor. [#666, #917]
  • Added BigInteger-typed previousTotalDifficulty parameter to Block<T>.Mine() static method. [#666, #917]
  • Added options optional parameter to Swarm<T>() constructor. [#926]
  • ICryptoBackend became to ICryptoBackend<T>. [#932]
  • ICryptoBackend.Verify(HashDigest<SHA256>, byte[], PublicKey) became to ICryptoBackend<T>.Verify(HashDigest<T>, byte[], PublicKey) [#932]
  • Added ICryptoBackend<T>.Sign(HashDigest<T>, PrivateKey) method. [#932]
  • DefaultCryptoBackend became to DefaultCryptoBackend<T>. [#932]
  • Added ImmutableArray<byte>-typed preEvaluationHash parameter to BlockHeader constructor. [#931, #935]
  • Added HashDigest<SHA256>-typed preEvaluationHash parameter to Block<T>() constructor. [#931, #935]
  • Replaced SerializationInfoExtensions.GetValueOrDefault<T>() to SerializationInfoExtensions.TryGetValue<T>(). [#940]
  • Added bool append = true option to both BlockChain<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 both BlockChain<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 two BlockChain<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 to BlockChain<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 both Swarm<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 with Peer(PublicKey) constructor. [#949]
  • Replaced BoundPeer(PublicKey, DnsEndPoint, AppProtocolVersion) constructor with Peer(PublicKey, DnsEndPoint) constructor. [#949]
  • Extracted IStore's some methods dedicated to block states into IBlockStatesStore. [#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 to LookupStateReference(Guid, string, long). [#950]
  • Added IStateStore-typed stateStore to BlockChain<T> constructor. [#950]
  • Replaced Swarm<T>.FindSpecificPeerAsync(Address, Address, int, BoundPeer, TimeSpan?, CancellationToken) method with Swarm<T>.FindSpecificPeerAsync(Address, int, TimeSpan?, CancellationToken). [#981]
  • Added IActionContext.GetUnconsumedContext() method. [#980]
  • Added ImmutableArray<byte>-typed stateRootHash parameter to BlockHeader constructor. [#986]
  • Added HashDigest<SHA256>-typed stateRootHash parameter to Block<T>() constructor. [#986]
  • Added IBlockPolicy<T>.MaxTransactionsPerBlock property. [#1037, #1050]
  • Added IBlockPolicy<T>.GetMaxBlockBytes() method. [#201, #1050]
  • IBlockPolicy<T>.DoesTransactionFollowPolicy() method became to take additional BlockChain<T> parameter as its context. [#1012]
  • Methods in BlockPolicy<T> class became virtual. [#1010]
  • Added int maxTransactionsPerBlock option to both BlockPolicy<T>() overloaded constructors. [#1037, #1050]
  • Added int maxBlockBytes and int maxGenesisBytes options to both BlockPolicy<T>() overloaded constructors. [#201, #1050]
  • BlockPolicy<T>() constructor's doesTransactionFollowPolicy parameter became Func<Transaction<T>, BlockChain<T>, bool> on . [#1012]
  • Added cacheSize optional parameter to BlockSet<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 to IImmutableDictionary<string, IImmutableList<HashDigest<SHA256>>> from IImmutableDictionary<Address, IImmutableList<HashDigest<SHA256>>>. [#912]
  • The existing RecentStates message type (with the type number 0x0f) was replaced by a new RecentStates message type (with the type number 0x13). [#912]
  • Added BlockHeader.TotalDifficulty property. [#666, #917]
  • The existing Pong message type (with the type number 0x02) was replaced by a new Pong message type (with the type number 0x14). [#459, #919, #920, #930]
  • The TimestampThreshold between Block<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 number 0x0d) was replaced by a new BlockHeaderMessage message type (with the type number 0x0c). [#1003, #1004]
  • Removed PreloadBlockDownloadFailEventArgs class. [#1002]
  • Removed blockDownloadFailed parameter from Swarm<T>.PreloadAsync() method. Use SwarmOptions.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 with GetState(Address, HashDigest<SHA256>?, StateCompleter<T>) method. Specifying completeStates: true and false can be replaced by stateCompleter: StateCompleters<T>.Recalculate and StateCompleters<T>.Reject, respectively.
    • Replaced BlockChain<T>.GetBalance(Address, Currency, HashDigest<SHA256>?, bool) method with GetState(Address, Currency, HashDigest<SHA256>?, StateCompleter<T>) method. Specifying completeStates: true and false can be replaced by stateCompleter: FungibleAssetStateCompleters<T>.Recalculate and FungibleAssetStateCompleters<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.
  • 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 implement IBlockStatesStore. [#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 implement IBlockStatesStore. [#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>.
    • Multiplexed response and broadcast. [#858, #859]
    • Reduced internal delays. [#871, #879]
  • Transaction<T>.Create(), Transaction<T>.EvaluateActions() and Transaction<T>.EvaluateActionsGradually() no longer throw UnexpectedlyTerminatedActionException directly. Instead, it records an exception to ActionEvaluations. [#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 throw InvalidBlockBytesLengthException if the given block's serialized bytes is longer than the limitation configured by IBlockPolicy.GetMaxBlockBytes(). [#201, #1050]
  • BlockChain<T>.MineBlock() method became to cut off transactions to include to fit into the limitation configured by IBlockPolicy.GetMaxBlockBytes(). [#201, #1050]
  • Swarm<T> became to ignore received transaction with different genesis hash. [#796, #878]
  • Swarm<T> became to ignore invalid BlockHeaders immediately. [#898]
  • Swarm<T>.PreloadAsync() became to clean up only temporary chains. [#902]
  • BlockPolicy<T> became to validate Block<T>.TotalDifficulty property of a Block<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 throw TimeoutException 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 validate Block<T>.StateRootHash property of a Block<T>. [#986]
  • Swarm<T> became not to sync Block<T>s from the peers with different genesis block. [#1003, #1004]
  • Swarm<T> became to ignore BlockHeaderMessage from the peers with different genesis block. [#1003, #1004]
  • BlockChain<T> instead of BlockPolicy<T> became to validate Block<T>s to append so that even if an empty implementation of IBlockPolicy<T> is used Block<T>s are unable to be appended to BlockChain<T>. [#1010]
  • BlockSet<T>[HashDigest<SHA256>] and BlockChain<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 with BinaryFormatter. [#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 to GetRecentStates message when the target block does not exist in the chain. [#941]
  • Fixed a bug that Swarm<T>.StartAsync() had not worked after Swarm<T>.StopAsync() was once called. [#965]
  • Fixed a bug that TurnClient had thrown InvalidOperationException 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 thrown InvalidGenesisBlockException 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 using npm. [#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
libplanet - Libplanet 0.9.5

Published by github-actions[bot] over 4 years ago

Released on June 12, 2020.

  • Fixed a bug that had not properly received block hashes after the chain had reorged. [#880, #905]
libplanet - Libplanet 0.9.4

Published by github-actions[bot] over 4 years ago

Released on June 2, 2020.

  • (Libplanet.RocksDBStore) Fixed a bug that RocksDBStore.DeleteChainId() method had thrown KeyNotFoundException when there's no such chain ID. [#891]
  • (Libplanet.RocksDBStore) Fixed a bug that RocksDBStore had written logs into the incorrect context DefaultContext, not RocksDBStore the correct one. [#891]