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.27.2

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

Released on February 8, 2022.

  • (Libplanet.Net) Sending a Message through NetMQTransport now fails immediately if the Message cannot be queued to a DealerSocket right away. [#1753, #1778]
libplanet - Libplanet 0.27.1

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

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

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

Released on February 4, 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]
libplanet - Libplanet 0.27.0

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

Released on January 26, 2022.

Deprecated APIs

  • Added EnumerableMeasurement static class. [#1764, #1766]

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 and int minimumBroadcastTarget parameters.
    • Added TimeSpan? dealerSocketLifetime parameter.
  • (Libplanet.Net) Removed RoutingTable table and int minimumBroadcastTarget parameters from TcpTransport() constructor. [#1741, #1744]
  • (Libplanet.Net) Removed ITransport.BroadcastMessage(Address?, Message) method. Instead, added ITransport.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.

Behavioral changes

  • MerkleTrie.Get() method now finds multiple states in parallel. [#1743]
  • (Libplanet.Net) DealerSockets used for broadcasting messages in NetMQTransport 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 individual Transaction<T>s. [#1755, #1758]

Dependencies

CLI tools

libplanet - Libplanet 0.26.2

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

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

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

Released on January 20, 2022.

  • General logging overhaul in NetMQTransport<T> for consistency and readability. [#1735]
libplanet - Libplanet 0.26.0

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

Released on January 18, 2022.

Backward-incompatible API changes

  • Replaced IValue StateCompleter<T>(BlockChain<T>, BlockHash, Address) delegate with IReadOnlyList<IValue?> StateCompleter<T>(BlockChain<T>, BlockHash, IReadOnlyList<Address>) delegate. [#1703]
  • Added IAccountStateDelta.GetStates(IReadOnlyList<Address>) method. [#1703]
  • Replaced IValue AccountStateGetter(Address) delegate with IReadOnlyList<IValue?> AccountStateGetter(IReadOnlyList<Address>) delegate. [#1703]
  • Removed StateGetter<T> delegate. [#1703]
  • Removed BalanceGetter<T> delegate. [#1703]
  • Removed StateGetter<T> stateGetter and BalanceGetter<T> balanceGetter parameters from ActionEvaluator<T>() constructor. [#1703]
  • Added IBlockChainStates<T> blockChainStates parameter to ActionEvaluator<T>() constructor. [#1703]
  • Replaced ITrie.TryGet() with ITrie.Get() method. [#1703]
  • Replaced StateStoreExtensions.GetState() static method with GetStates() static method. [#1703]
  • nullable context enabled for IProtocol interface and Kademlia, KademliaProtocol, and RoutingTable classes. [#1692]
  • RoutingTable.Neighbors(Peer, int, bool) changed to RoutingTable.Neighbors(BoundPeer, int, bool). As a result, RoutingTable class now only explicitly deals with BoundPeers. [#1692]
  • BlockChain<T>.StageTransaction(), IStagePolicy.Stage(), and IStagePolicy.Unstage() now all return bool 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 implements IBlockChainStates<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 attached BlockChain<T> with peers became more performant by splitting downloading and appending blocks into two parallel tasks.

Bug fixes

  • Fixed a bug where unnecessary additional attempts were made to unresponsive Peers when discovering a Peer through KademliaProtocol. [#1692]
libplanet - Libplanet 0.25.4

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

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

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

Released on January 14, 2022.

  • Fixed a bug when message broadcasting on Swarm<T> had been stopped suddenly. [#1715]
libplanet - Libplanet 0.25.2

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

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 single RequestTxsFromPeerAsync() task for each peer, a new RequestTxsFromPeerAsync() task is spawned every time a new demand is received. [#1704]
libplanet - Libplanet 0.25.1

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

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

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

Released on January 5, 2022.

Backward-incompatible API changes

  • Replaced HashDigest<T>(ImmutableArray<byte>) constructor with HashDigest<T>(in ImmutableArray<byte>) constructor. [#1678]
  • IKeyValueStore's key type became KeyBytes (was byte[]). [#1678]
    • Replaced IKeyValueStore.Get(byte[]) method with Get(in KeyBytes) method.
    • Replaced IKeyValueStore.Set(byte[], byte[]) method with Set(in KeyBytes, byte[]) method.
    • Replaced IKeyValueStore.Set(IDictionary<byte[], byte[]>) method with Set(IDictionary<KeyBytes, byte[]>) method.
    • Replaced IKeyValueStore.Delete(byte[]) method with Delete(in KeyBytes) method.
    • Replaced IKeyValueStore.Exists(byte[]) method with Exists(in KeyBytes) method.
    • IKeyValueStore.ListKeys() method's return type became IEnumerable<KeyBytes> (was IEnumerable<byte[]>).
  • ITrie's key type became KeyBytes (was byte[]). [#1689]
    • Replaced ITrie.Set(byte[], IValue) method with Set(in KeyBytes, IValue) method.
    • Replaced ITrie.TryGet(byte[], out IValue?) method with TryGet(in KeyBytes, out IValue?) method.
    • The return type of MerkleTrieExtensions.ListAllStates() static method became IEnumerable<KeyValuePair<KeyBytes, IValue>> (was IEnumerable<KeyValuePair<ImmutableArray<byte>, IValue>>). [#1653]
  • Added IKeyValueStore.Get(IEnumerable<KeyBytes>) method. [#1678]
  • Added IKeyValueStore.Delete(IEnumerable<KeyBytes>) method. [#1678]
  • nullable context enabled for Peer and BoundPeer classes. All public constructors now explicitly take non-nullable parameters. [#1679]
    • All publicly accessibe properties of Peer and BoundPeer are now non-nullable except for Peer.PublicIPAddress.
  • Replaced HashDigest<T>.DeriveFrom(ReadOnlySpan<byte>) overloaded static method with ohter new overloads. [#1680]

Backward-incompatible network protocol changes

  • Removed Sender property from Messages.TxIds and Messages.TxIds's MessageType value bumped to 0x31. [#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]
  • Improved performance of RocksDBStore<T>.IterateIndexes() method. [#1676]
libplanet - Libplanet 0.24.2

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

Released on December 24, 2021.

  • Fixed a bug of NonblockRenderer<T> and NonblockActionRenderer<T> where they had thrown ThreadStateException when any render events occured after disposed. [#1682]
  • Log output compacted by removing duplicate exception messages. [#1632, #1677]
libplanet - Libplanet 0.23.4

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

Released on December 24, 2021.

  • Fixed a bug of NonblockRenderer<T> and NonblockActionRenderer<T> where they had thrown ThreadStateException when any render events occured after disposed. [#1682]
libplanet - Libplanet 0.24.1

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

Released on December 16, 2021.

  • Fixed a bug where Transaction<T>s were unstaged when they were not supposed to. [#1672]
libplanet - Libplanet 0.24.0

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

Released on December 16, 2021.

Backward-incompatible API changes

  • IStagePolicy<T>'s interface methods updated. Notably, all IStagePolicy<T> now accept BlockChain<T> as its parameter. [#1648]
    • Get(BlockChain<T> blockChain, TxId id, bool includeInstaged) changed to Get(BlockChain<T> blockChain, TxId id, bool filtered = true).
    • Iterate() changed to Iterate(BlockChain<T> blockChain, bool filtered = true).
    • GetNextTxNonce(Address address, long minedTxs) changed to GetNextTxNonce(BlockChain<T> blockChain, Address address).

Behavioral changes

  • Description of IStagePolicy<T> and its default implementation VolatileStagePolicy<T> is overhauled. [#1648]
    • IStagePolicy<T>.Iterate() no longer guarantees any kind of ordering.
    • IStagePolicy<T>.Ignore() now also unstages the Transaction<T>.
    • VolatileStagePolicy<T> now holds every previously known unconfirmed Transaction<T> regardless of its staging/unstaging history unless it is expired or ignored.
  • New log output tagged with Metric added to measure execution time for BlockChain<T>.FindNextHashes(). [#1669]

Bug fixes

  • Fixed a bug where TxCompletion had broadcasted invalid transactions. [#1661]
libplanet - Libplanet 0.23.3

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

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

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

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]
  • Fixed a bug where RocksDBStore.ForkBlockIndexes() had created temporary chains unnecessarily. [#1657]
libplanet - Libplanet 0.23.1

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

Released on December 10, 2021.

  • Fixed TrieStateStore.PruneStates() method's bug that it had thrown ArgumentOutOfRangeException. [#1653, #1654]
libplanet - Libplanet 0.23.0

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

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 for KBucket.GetRandomPeer() now defaults to null. [#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 and KBucket.Tail now properly return null if the bucket is empty instead of faulting. [#1631]
  • TxCompletion.Demand() no longer requests Transaction<T>s already in storage. [#1649]

Dependencies