Skip to content

Releases: planetarium/libplanet

Libplanet 0.11.1

07 Jun 02:07
0.11.1
f19f91d
Compare
Choose a tag to compare

Released on April 22th, 2021.

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

Libplanet 0.11.0

30 Mar 08:48
b9a9754
Compare
Choose a tag to compare

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

Read more

Libplanet 0.10.3

28 Jan 14:35
3fefb41
Compare
Choose a tag to compare

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 0.10.2

25 Nov 11:25
0.10.2
88596ee
Compare
Choose a tag to compare

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 0.10.1

24 Nov 05:51
0.10.1
dab5874
Compare
Choose a tag to compare

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 0.10.0

27 Oct 06:12
4bd864b
Compare
Choose a tag to compare

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, BlockChain...
Read more

Libplanet 0.9.5

12 Jun 06:02
b8b5b25
Compare
Choose a tag to compare

Released on June 12, 2020.

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

Libplanet 0.9.4

02 Jun 11:50
0.9.4
45b057a
Compare
Choose a tag to compare

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]

Libplanet 0.9.3

29 May 08:15
0.9.3
5e8a742
Compare
Choose a tag to compare

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]

Libplanet 0.9.2

20 May 06:07
2bb11fb
Compare
Choose a tag to compare

Released on May 20, 2020.

  • (Libplanet.RocksDBStore) Fixed a memory leak bug in RocksDBStore. [#870]