Skip to content

Releases: planetarium/libplanet

Libplanet 0.45.0

02 Dec 18:34
364d5ea
Compare
Choose a tag to compare

Released on December 3, 2022.

Deprecated APIs

  • Removed BlockChain<T>.MineBlock(PrivateKey, DateTimeOffset, bool, long, int, int, IComparer<Transaction<T>>, CancellationToken?) by making it internal. [#2529]
  • Removed IStore.SetBlockPerceivedTime() and IStore.GetBlockPerceivedTime() methods. [#2575]
  • Removed BlockPerception struct. [#2575]
  • Removed BlockChain<T>.PerceiveBlock() method. [#2575]

Backward-incompatible API changes

  • Changed BlockChain<T>.MineBlock(PrivateKey, DateTimeOffset?, bool?, long?, int?, int?, IComparer<Transaction<T>>, CancellationToken?) to BlockChain<T>.MineBlock(PrivateKey, DateTimeOffset?, bool?, IComparer<Transaction<T>>, CancellationToken?) by removing policy controlled parameters. [#2529]
  • Changed BlockPolicy<T>() constructor to take additional Func<long, int> type parameter named getMinBlockProtocolVersion. [#2593]

Added APIs

  • Added BlockChainStates<T> class. [#2507]
  • Added new constructors of BlockChain<T> takes IBlockChainStates<T> and ActionEvaluator<T> directly. [#2507]
  • Added non-generic interfaces. [#2539]
    • Added IPreEvaluationBlock interface.
    • Added IBlockContent interface.
    • Added ITransaction interface.
  • Added IActionTypeLoader interface. [#2539]
  • Added StaticActionTypeLoader class. [#2539]
  • (Libplanet.Explorer) Added a new GraphQL endpoint on /graphql/explorer. [#2562]
  • Added IBlockPolicy.GetMinBlockProtocolVersion() interface method. [#2593]

Bug fixes

  • (Libplanet.Net) Fixed a bug where AppProtocolVersion.GetHashCode() did not work as intended. [#2518, #2520]

Dependencies

CLI tools

  • Now planet can be installed using Homebrew on macOS: brew install planetarium/brew/planet. [#2555]
  • Now planet supports command-line completion for bash and zsh. See also Cocona's manual on configuring command-line completion. [#2586]
  • (Libplanet.Explorer) Added serve subcommand. [#2563]
    • (Libplanet.Explorer) Deprecated primary command. It will be obsoleted in 0.47.0 release. You should use serve command instead. [#2563]
  • (Libplanet.Explorer) Added schema subcommand. [#2563]

Libplanet 0.44.3

01 Dec 15:09
0.44.3
f6dc3b6
Compare
Choose a tag to compare

Released on December 1, 2022.

  • Fixed a bug of TxMetadata.ToBencodex() method where the encoded timestamp had differed from TxMetadata.Timestamp when it has non-zero time zone offset. [#2598]

Libplanet 0.44.2

29 Nov 15:26
2f4f33b
Compare
Choose a tag to compare

Released on November 29, 2022.

  • Improved performance of .Iterate() and .GetNextTxNonce() of VolatileStagePolicy. [#2589]

Libplanet 0.44.1

07 Nov 07:00
3677c68
Compare
Choose a tag to compare

Released on November 7, 2022.

  • (Libplanet.Net) Fixed a bug where NetMQTransport.SendMessageAsnyc() had hung forever when given peer information isn't valid. [#2424, #2521]

Libplanet 0.43.3

07 Nov 06:02
47673ae
Compare
Choose a tag to compare

Released on November 7, 2022.

  • (Libplanet.Net) Fixed a bug where NetMQTransport.SendMessageAsnyc() had hung forever when given peer information isn't valid. [#2424, #2521]

Libplanet 0.44.0

02 Nov 07:12
82bee6b
Compare
Choose a tag to compare

Released on November 2, 2022.

Backward-incompatible API changes

  • Removed all TxMetadata.ToBencodex() overload methods with parameters. Use newly introduced parameterless TxMetadata.ToBencodex() instead. [#2457]
  • (Libplanet.Node) Changed UntypedTransaction(ITxMetadata, IEnumerable<IValue>, ImmutableArray<byte>) to UntypedTransaction( ITxMetadata, IValue?, IValue?, ImmutableArray<byte>) to support Transaction<T>.SystemAction. [#2456, #2457]
  • (Libplanet.Node) Renamed UntypedTransaction.ActionValues to UntypedTransaction.CustomActionsValue and changed its type from IReadOnlyList<IValue> to IValue?. [#2456, #2457]

Added APIs

  • (Libplanet.Explorer) Added json field to ActionType GraphQL type. [#2418]
  • (Libplanet.Node) Added IValue? SystemActionValue property to UntypedTransaction. [#2456, #2457]

Behavioral changes

  • Optimized ByteUtil.CalculateHash() method. [#2437, #2459]

Bug fixes

  • (Libplanet.Explorer) Libplanet.Explorer.Executable became to work again. [#2420]

CLI tools

  • Added builds for Apple Silicon to releases. [#2365]

Libplanet 0.43.2

01 Nov 06:57
0.43.2
295f65e
Compare
Choose a tag to compare

Released on November 1, 2022.

  • (Libplanet.RocksDBStore) RocksDBStore no more crashes with stack overflow during iterating block indices even if a chain is deeply nested (due to forks). [#2338, #2379]

Libplanet 0.43.1

17 Oct 06:19
0.43.1
74ee470
Compare
Choose a tag to compare

Released on October 17, 2022.

Added APIs

  • (Libplanet.Explorer) Added TxResultType.UpdatedStateType and TxResultType.FungibleAssetBalancesType GraphQL types. [#2405]

Libplanet 0.43.0

14 Oct 08:50
0.43.0
d0cbfa7
Compare
Choose a tag to compare

Released on October 14, 2022.

Since 0.43.0, we officially provide @planetarium/tx, an npm package for creating unsigned transactions in JavaScript/TypeScript. Although it is still in experimental stage, which can build only unsigned transactions with a system action, its features will be added more in the future.

Backward-incompatible API changes

  • Removed DateTimeOffset? type parameter that allowed a creation of a genesis Block<T> with specific timestamp from BlockChain<T>.MakeGenesisBlock(). [#2321]
  • Overhauled constructors for BlockMetadata, BlockContent<T>, PreEvaluationBlockHeader, PreEvaluationBlock<T>, BlockHeader, and Block<T>. [#2321]
    • All unsafe constructors have been removed in order to prevent instantiation of invalid block related objects.
    • BlockMetadata has constructors BlockMetadata(IBlockMetadata) and BlockMetadata(long, DateTimeOffset, PublicKey, long, BigInteger, BlockHash?, HashDigest<SHA256>).
    • BlockContent has constructors BlockContent<T>(IBlockMetadata, IEnumerable<Transaction<T>> transactions), BlockContent<T>(BlockMetadata) and BlockContent<T>(BlockMetadata, IEnumerable<Trnasaction<T>> transactions).
    • PreEvaluationBlockHeader has constructors PreEvaluationBlockHeader(IPreEvaluationBlockHeader) and PreEvaluationBlockHeader(BlockMetadata, (Nonce, ImmutableArray<byte>)).
    • PreEvaluationBlock<T> has constructors PreEvaluationBlock<T>(IPreEvaluationBlockHeader, IEnumerable<Transaction<T>>) and PreEvaluatoinBlock<T>(BlockContent<T>, (Nonce, ImmutableArray<byte>)).
    • BlockHeader has constructors BlockHeader(IBlockHeader) and BlockHeader(PreEvaluationBlockHeader, (HashDigest<SHA256>, ImmutableArray<byte>?, BlockHash)).
    • Block<T> has constructors Block<T>(IBlockHeader, IEnumerable<Transaction<T>>) and Block<T>(PreEvaluationBlock<T>, (HashDigest<SHA256>, ImmutableArray<byte>, BlockHash)).
  • BlockContent<T> no longer inherits BlockMetadata and PreEvaluationBlock<T> no longer inherits PreEvaluationBlockHeader. [#2321]
  • Both BlockMetadata and BlockContent<T> are made immutable. Their properties can no longer be assigned to. [#2321]
  • Copy extension methods for BlockMetadata and BlockContent<T> removed. [#2321]
  • (Libplanet.Extensions.Cocona) The return type of Utils.DeserializeHumanReadable<T>() static method became T? (was T). [#2322]

Added APIs

  • System actions now have methods to check equality. [#2294]
    • Mint now implements IEquatable<Mint>.
    • Mint now implements IEquatable<IAction>.
    • Transfer now implements IEquatable<Transfer>.
    • Transfer now implements IEquatable<IAction>.
  • (Libplanet.Net) Added IRoutingTable interface. [#2046, #2229]
  • (Libplanet.Net) RoutingTable now implements IRoutingTable interface. [#2046, #2229]
  • Added ActionEvaluator<T>.GenerateRandomSeed() static method. [#2131, #2236]
  • Each BlockMetadata, PreEvaluationBlockHeader, and BlockHeader can be accessed from any "larger" type object through properties. [#2321]
    • BlockMetadata can be accessed through BlockContent<T>.Metadata or PreEvaluationBlockHeader.Metadata.
    • PreEvaluationBlockHeader can be accessed through PreEvaluationBlock<T>.Header or BlockHeader.Header.
    • BlockHeader can be accessed thorugh Block<T>.Header (this has not changed, but only listed here for completeness in narrative).
  • (Libplanet.Explorer) Added updatedStates, updatedFungibleAssets, fungibleAssetsDelta GraphQL fields to TxResultType. [#2353]
  • (Libplanet.Explorer) Added nextNonce query in TransactionQuery<T>. [#2356, #2366]

Behavioral changes

  • Many types became serialized and deserialized better with System.Text.Json.JsonSerializer as they now have their own custom converters. Note that these serializations are unavailable on Unity due to its incomplete reflection support. [#2294, #2322]
    • An Address became represented as a single hexadecimal string in JSON. [#2322]
    • A BlockHash became represented as a single hexadecimal string in JSON. [#2322]
    • A Currency became represented as an object with values in JSON. Note that it contains its Hash and it throws JsonException if a JSON object to deserialize has an inconsistent Hash with other field values. [#2322]
    • A FungibleAssetValue became represented as an object with its Currency object and Quantity string. [#2322]
    • A HashDigest<T> became represented as a single hexadecimal string in JSON. [#2322]
    • A Transaction<T> became represented as an object with values in JSON. [#2294]
    • A TxId became represented as a single hexadecimal string in JSON. [#2322]
    • System actions became represented as a Bencodex JSON Representation of their PlainValue with type_id field. [#2294]
  • System actions' GetHashCode() and Equals(object) methods now check value equality (rather than reference equality). [#2294]
  • A ValidateAppProtocolVersion became allow validation of different extra. [#2380]

Bug fixes

  • Interface methods IComparable.CompareTo() and IComparable<T>.CompareTo() for Address are now accessible. [#2384]

Dependencies

CLI tools

  • Added planet tx subcommand group. [#2294]
    • Added planet tx analyze subcommand.
    • Added planet tx help subcommand.

Libplanet 0.42.2

29 Sep 07:44
0.42.2
b0e1757
Compare
Choose a tag to compare

Released on September 29, 2022.

  • (Libplanet.Explorer) Fixed a bug of TransactionQuery<T> that bindSignature() had errored if unsignedTransaction has a system action. [#2358]