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

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

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 - Libplanet 0.42.2

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

Released on September 29, 2022.

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

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

Released on September 29, 2022.

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

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

Released on September 29, 2022.

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

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

Released on September 23, 2022.

  • Fixed a bug where Transaction<T>.ToBencodex(bool) method had incorrectly serialized SystemAction. [#2339]
libplanet - Libplanet 0.41.3

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

Released on September 23, 2022.

  • Fixed a bug where Transaction<T>.ToBencodex(bool) method had incorrectly serialized SystemAction. [#2339]
libplanet - Libplanet 0.40.2

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

Released on September 23, 2022.

  • Fixed a bug where Transaction<T>.ToBencodex(bool) method had incorrectly serialized SystemAction. [#2339]
libplanet - Libplanet 0.42.0

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

Released on September 19, 2022.

Backward-incompatible API changes

  • Renamed BlockChain<T>.MakeTransaction(PrivateKey, IEnumerable<T>, IImmutableSet<Address>, DateTimeOffset?) method's actions parameter to customActions. [#2151, #2273]
  • Changed IBlockPolicy.GetMaxBlockBytes() to IBlockPolicy.GetMaxTransactionBytes(). Behaviourally, this is now used as an upper limit for the encoded size of Block<T>.Transactions instead of Block<T>. [#2290, #2291]
    • (Libplanet.Explorer) Changed Options.MaxBlockBytes to Options.MaxTransactionsBytes and Options.MaxGenesisBytes to Options.MaxGenesisTransactionsBytes.
    • (Libplanet.Explorer) Changed executable argument max-block-bytes to max-transactions-bytes and max-genesis-bytes to max-genesis-transactions-bytes.
    • All public method parameter names maxBlockBytes changed to maxTransactionsBytes.

Added APIs

  • Address now implements IEquatable<Address> interface. [#2320]
  • TxId now implements IEquatable<TxId> interface. [#2320]
  • Added BlockChain<T>.MakeTransaction(PrivateKey, IAction, IImmutableSet<Address>, DateTimeOffset?) overloaded method. [#2151, #2273]
  • Added GetInnerActionTypeName() method. [#1910, #2189]
  • (Libplanet.Explorer) Added LibplanetExplorerSchema class. [#2065, [#2198]]

Dependencies

libplanet - Libplanet 0.41.2

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

Released on September 13, 2022.

  • Fixed a bug where NetMQTransport is not correctly disposed of due to NetMQTransport._router already being stopped in prior to _router.Unbind() call in NetMQTransport.Dispose(). [#2311]
libplanet - Libplanet 0.41.1

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

Released on August 31, 2022.

  • Fixed a bug where Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?) method had thrown ArgumentNullException with valid arguments. [#2268, #2270]
libplanet - Libplanet 0.40.1

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

Released on August 31, 2022.

  • Fixed a bug where Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?) method had thrown ArgumentNullException with valid arguments. [#2268]
libplanet - Libplanet 0.41.0

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

Released on August 26, 2022.

Deprecated APIs

  • (Libplanet.Net) Removed NetMQTransport() constructor. Use NetMQTransport.Create() instead. [#2215]
  • Unused TcpMessageCodec class removed. [#2216]
  • (Libplanet.Stun) Removed TurnClient.IsConnectable() method. [#2219]
  • (Libplanet.Stun) Removed TurnClient.BindProxies() method. [#2219]
  • (Libplanet.Stun) Removed TurnClient() constructor. Use TurnClient.Create() instead. [#2219]
  • (Libplanet.Net) Removed Peer class. Use BoundPeer instead. [#2233]

Backward-incompatible API changes

  • Removed unused transaction related methods from IStore and its implementations. [#1538, #2201]
    • IterateTransactionIds()
    • DeleteTransaction()
    • CountTransactions()
  • Removed Currency(string, byte, IImutableSet<Address>?) constructor. [#2200]
  • Removed Currency(string, byte, Address?) constructor. [#2200]
  • Added static methods of Currency that defines different kinds of Currency. [#2200]
    • Added Currency.Capped(string, byte, (BigInteger, BigInteger), IImutableSet<Address>?) static method which defines an instance of Currency with a hard limit on the maximum minted supply.
    • Added Currency.Capped(string, byte, (BigInteger, BigInteger), Address) static method which defines an instance of Currency with a hard limit on the maximum minted supply.
    • Added Currency.Uncapped(string, byte, IImutableSet<Address>?) static method which defines an instance of Currency without an enforced maximum supply limit.
    • Added Currency.Uncapped(string, byte, Address) static method which defines an instance of Currency without an enforced maximum supply limit.
    • OBSOLETE, ONLY FOR LEGACY SUPPORT: Added Currency.Legacy(string, byte, IImutableSet<Address>?) static method which defines a legacy Currency instance which is compatible with Currency instances defined before total supply tracking support was introduced.
    • OBSOLETE, ONLY FOR LEGACY SUPPORT: Added Currency.Legacy(string, byte, Address) static method which defines a legacy Currency instance which is compatible with Currency instances defined before total supply tracking support was introduced.
    • NOTE: if you already have some Currency instances defined in prior to the addition of total supply tracking on a live chain, you cannot modify the already-defined Currency instances as a capped or uncapped Currency but have to define them with Currency.Legacy() as the new Currency kinds are internally backwards-incompatible with the legacy Currency.
  • Added IAccountStateDelta.TotalSupplyUpdatedCurrencies property. [#915, #2200]
  • Added IAccountStateView.GetTotalSupply(Currency) method. [#915, #2200]
  • Added IBlockChainStates<T>.GetTotalSupply(Currency, BlockHash, TotalSupplyStateCompleter<T> method which gets the total supply of a Currency in FungibleAssetValue from the state, and if not found, returns null. [#915, #2200]
  • (Libplanet.Net) ITransport.AsPeer and Swarm<T>.AsPeer type changed from Peer to BoundPeer. [#2215]
  • (Libplanet.Net) All public return type, parameter type, and property type of Peer changed to BoundPeer. [#2228]
  • (Libplanet.Net) Additional public return type, parameter type, and property type of Peer that weren't handled by #2228 changed to BoundPeer. [#2233]
  • Reworked constructors of exception classes. Affected classes are:
    • (Libplanet.Net) PingTimeoutException
    • CurrencyPermissionException, DuplicateActionTypeIdentifierException, InsufficientBalanceException, InvalidBlockPreEvaluationHashException, InvalidBlockProtocolVersionException, InvalidBlockPublicKeyException, InvalidBlockSignatureException, InvalidBlockStateRootHashException, InvalidBlockTotalDifficultyException, InvalidGenesisBlockException, InvalidTxException, InvalidTxGenesisHashException, InvalidTxIdException, InvalidTxNonceException, InvalidTxSignatureException, MissingActionTypeException, NoKeyException, SupplyOverflowException, TotalSupplyNotTrackableException, TxPolicyViolationException, UnexpectedlyTerminatedActionException. [#2239, #2241]

Added APIs

  • Added Currency.MaximumSupply property. [#915, #2200]
  • Added Currency.TotalSupplyTrackable field. [#915, #2200]
  • Added SupplyOverflowException class. [#915, #2200]
  • Added TotalSupplyGetter delegate. [#915, #2200]
  • Added TotalSupplyStateCompleter<T> delegate. [#915, #2200]
  • Added TotalSupplyStateCompleters<T> static class. [#915, #2200]
  • Added StateCompleterSet<T>.TotalSupplyStateCompleter property. [#915, #2200]
  • (Libplanet.Net) Added BoundPeer.PeerString property. [#2187, #2232]
  • (Libplanet.Stun) Added IIceServer interface. [#2219]
  • (Libplanet.Stun) Added TurnClient.Create() static method. [#2219]
  • (Libplanet.Explorer) Added stateQuery field to the root node of GraphQL endpoint. [#2149, #2227]
  • (Libplanet.Explorer) Added blockPolicy field to the root node of GraphQL endpoint. [#2149, #2227]
  • (Libplanet.Explorer) Added CurrencyType class. In GraphQL, it corresponds to Currency type. [#2149, #2227]
  • (Libplanet.Explorer) Added FungibleAssetValueType class. In GraphQL, it corresponds to FungibleAssetValue type. [#2149, #2227]
  • (Libplanet.Explorer) Added StateQuery<T> class. In GraphQL, it corresponds to StateQuery type. [#2149, #2227]
  • (Libplanet.Explorer) Added BlockPolicyType<T> class. In GraphQL, it corresponds to BlockPolicy type. [#2149, #2227]

Behavioral changes

  • Bencodex related methods in Currency now accounts for the maximum supply and total supply tracking. [#915, #2200]
    • For capped currencies, Currency.Serialize() method stores the major and minor values of the maximum supply as Integer values under the keys maximumSupplyMajor and maximumSupplyMinor. For uncapped and legacy untracked currencies, the entries are omitted.
    • Currency(IValue) constructor now looks for the maximum supply and total supply trackability in the given dictionary and restores them if found.
  • Currency's implementation of ISerializable now accounts for the maximum supply and total supply tracking. [#915, #2200]
    • Currency's implementation of ISerializable.GetObjectData now stores the maximum supply if the Currency is capped.
    • Currency(SerializationInfo, StreamingContext) constructor now looks for the maximum supply and total supply trackability and restores it if found.
  • IAccountStateDelta.MintAsset(Address, FungibleAssetValue) and IAccountStateDelta.BurnAsset(Address, FungibleAssetValue) methods now track the total supply if the total supply of the Currency is trackable. [#915, #2200]
    • IAccountStateDelta.MintAsset(Address, FungibleAssetValue) method now throws SupplyOverflowException if the sum of current total supply and the value to be minted exceeds the maximum supply of the Currency instance.
  • (Libplanet.Net) NetMQTransport's general behavior has changed. [#2215]
    • NetMQTransport is now able to send requests and receive replies as soon as it is created through NetMQTransport.Create() factory method.
    • NetMQTransport.StartAsync() enables a NetMQTransport instance to recieve requests and send replies.
    • NetMQTransport.StopAsync() only disables a NetMQTransport instance to stop recieving requests and sending replies.
libplanet - Libplanet 0.40.0

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

Released on Auguest 12th, 2022.

Deprecated APIs

  • Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[]) constructor is now deprecated. Use Transaction<T>(ITxMetadata, IEnumerable<T>, byte[]) constructor or Transaction<T>.Create() static method instead. [#2175]
  • Transaction<T>.Actions property is now deprecated. Use Transaction<T>.SystemAction property or Transaction<T>.CustomActions property instead. [#2149, #2151, #2175]
  • IPreEvaluationBlockHeader.HashAlgorithm property and its implementations removed. [#2206, #2207]
  • IBlockPolicy.GetHashAlgorithm(long) method and its implementations removed. [#2206, #2207]
  • InvalidBlockHashAlgorithmTypeException class removed. [#2206, #2207]
  • HashAlgorithmGetter delegate removed. [#2206, #2207]

Backward-incompatible API changes

  • The type of Transaction<T>.Actions property became IImmutableList<IAction> (was IImmutableList<T> where T : IAction, new()). [#2149, #2151, #2175]
  • Renamed parameters named actions of many methods to customActions. [#2149, #2151, #2175]
    • Renamed Transaction<T>(ITxMetadata, IEnumerable<T>, byte[]) constructor's parameter actions to customActions.
    • Renamed Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[]) constructor's parameter actions to customActions.
    • Renamed Transaction<T>.Create(long, PrivateKey, BlockHash?, IEnumerable<T>, IImmutableSet<Address>?, DateTimeOffset?) static method's parameter actions to customActions.
    • Renamed Transaction<T>.CreateUnsigned(long, PrivateKey, BlockHash?, IEnumerable<T>, IImmutableSet<Address>?, DateTimeOffset?) static method's parameter actions to customActions.
    • Renamed TxMetadata.ToBencodex(IEnumerable<IValue>, IImmutableArray<byte>?) method's parameter actions to customActions.
  • Added IBlockPolicy<T>.NativeTokens property. [#2149, #2150, #2175]
  • Added option IImmutableSet<Currency>? nativeTokens to BlockPolicy<T>() constructor as its last parameter. [#2149, #2150, #2175]
  • Added IActionContext.IsNativeToken(Currency) method. [#2149, #2150, #2175]
  • Added parameter Predicate<Currency> nativeTokenPredicate to all PreEvaluationBlock<T>.Evaluate() method as its second parameter (parameter IStateStore stateStore remains at the last). [#2149, #2150, #2175]
  • Added parameter Predicate<Currency> nativeTokenPredicate to all PreEvaluationBlock<T>.DetermineStateRootHash() overloads as their second parameter (existing second and rest parameters were shifted). [#2149, #2150, #2175]
  • Added parameter Predicate<Currency> nativeTokenPredicate to BlockChain<T>.MakeGenesisBlock() method as its last parameter. [#2149, #2150, #2175]
  • Added parameter Predicate<Currency> nativeTokenPredicate to ActionEvaluator<T>() constructor as its last parameter. [#2149, #2150, #2175]
  • Removed ChainIdNotFoundException class. [#2047, #2156]
  • Added IStore.GetCanonicalGenesisBlock(HashAlgorithmGetter) method. [#2162, #2171]
  • Parameter HashAlgorithmType hashAlgorithm removed from BlockChain<T>.MakeGenesisBlock() method. [#2206, #2207]
  • Parameter HashAlgorithmType hashAlgorithm removed from BlockContent<T>.Mine() method. [#2206, #2207]
  • Parameter HashAlgorithmType hashAlgorithm removed from PreEvaluationBlock<T>() constructors. [#2206, #2207]
  • Parameter HashAlgorithmType hashAlgorithm removed from PreEvaluationBlockHeader<T>() constructors. [#2206, #2207]
  • Parameter HashAlgorithmType hashAlgorithm removed from BlockMetadata<T>.DerivePreEvaluationHash() method. [#2206, #2207]
  • Parameter HashAlgorithmType hashAlgorithm removed from BlockMetadata<T>.MineNonce() methods. [#2206, #2207]
  • Return type for BlockMarshaler .UnmarshalPreEvaluationBlockHeader(Dictionary) changed from (BlockMetadata, Nonce, ImmutableArray<bytes>?) to PreEvaluationBlockHeader. Removed overload method BlockMarshaler .UnmarshalPreEvaluationBlockHeader(HashAlgorithm, Dictionary). [#2206, #2207]
  • Parameter HashAlgorithmGetter hashAlgorithmGetter removed from BlockMarshaler.UnmarshalBlockHeader() method. [#2206, #2207]
  • Parameter HashAlgorithmGetter hashAlgorithmGetter removed from IStore<T>.GetCanonicalGenesisBlock<T>() and IStore<T>.GetBlock<T>() interface methods and their implementations. [#2206, #2207]
  • Parameter HashAlgorithmGetter hashAlgorithmGetter removed from BlockSet<T>() constructor. [#2206, #2207]
  • Parameter HashAlgorithmGetter hashAlgorithmGetter removed from BlockDigest.GetHeader() method. [#2206, #2207]
  • Parameter HashAlgorithmGetter hashAlgorithmGetter removed from DelayedRenderer<T>() constructor. [#2206, #2207]
  • Parameter HashAlgorithmGetter hashAlgorithmGetter removed from DelayedActionRenderer<T>() constructor. [#2206, #2207]
  • (Libplanet.Node) Parameter HashAlgorithmGetter hashAlgorithm removed from UntypedBlock() constructor. [#2206, #2207]

Added APIs

  • (Libplanet.Explorer) Added TransactionMutation<T> class. [#2130]
  • (Libplanet.Explorer) Added unsignedTransaction, bindSignature and transactionResult GraphQL fields to TransactionQuery<T>. [#2130]
  • Added Transaction<T>.SystemAction property. [#2149, #2151, #2175]
  • Added Transaction<T>.CustomActions property. [#2149, #2151, #2175]
  • Added overloads to take systemAction besides the existing constructors and methods taking customActions. [#2149, #2151, #2175]
    • Added Transaction<T>(ITxMetadata, IAction, byte[]) overloaded constructor.
    • Added Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?) overloaded static method.
    • Added Transaction<T>.CreateUnsigned(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?) overloaded static method.
    • Added TxMetadata.ToBencodex(IValue, ImmutableArray<byte>?) overloaded method.
  • Introduced new system built-in actions. [#2149, #2150, #2175]
    • Added Mint class.
    • Added Transfer class.
  • Added NonNativeTokenException class. [#2149, #2150, #2175]
  • Added BlockLocator class. [#1762, #2140]
  • Added methods required for decoupling Libplanet.Net from Libplanet. [#1762, #2140]
    • Added BlockChain<T>.FindNextHashes(BlockLocator, BlockHash?, int) method.
    • Added BlockChain<T>.Fork(BlockHash, bool) method.
    • Added BlockChain<T>.GetBlockLocator(int) method.
  • Added IActionContext.GenesisHash property. [#1972, #2179]
  • Added ActionEvaluator<T>.GenesisHash property. [#1972, #2179]
  • Added IAccountStateView interface. [#2183]
  • IAccountStateDelta now inherits IAccountStateView interface. [#2183]
  • Added BlockMetadata.HashAlgorithmType static property. [#2206, #2207]
  • Added BlockMarshaler.UnmarshalNonce(Dictionary) and BlockMarshaler.UnmarshalPreEvaluationHash(Dictionary) methods. [#2206, #2207]

Behavioral changes

  • BlockChain<T>.PerceiveBlock() method now uses millisecond precision for perceive time of newly perceived blocks. [#2155, #2159]
  • Nonexistent chain ids in IStore are now considered to be chain ids of empty chains. [#2047, #2156]
  • Libplanet.Explorer now targets .NET 6.0. [#2173]
  • Behavior of Block<T>.GetHashCode() changed. [#2206, #2207]
libplanet - Libplanet 0.39.0

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

Released on July 18th, 2022.

Deprecated APIs

  • (Libplanet.Net) Removed TcpTransport class. [#2139]
  • (Libplanet.Net) Removed InvalidMagicCookieException class. [#2139]
  • (Libplanet.Net) Removed SwarmOptions.TransportType property. [#2139]
  • (Libplanet.Node) Removed InitConfig.TransportType property. [#2139]

Added APIs

  • Added DuplicateActionTypeIdentifierException class. [#2142]

Behavioral changes

  • (Libplanet.Net) Raised the default value for Swarm<T>() constructor's workers parameter to 100. [#2128, #2134]
  • (Libplanet.Explorer) Raised the default value for workers console argument to 100. [#2128, #2134]
  • PolymorphicAction<T> now allows subclasses of T to be declared in the entry assembly of the application besides the same assembly as T. [#2136, #2142]
  • PolymorphicAction<T> now throws DuplicateActionTypeIdentifierException when multiple subtypes of T are associated with the same ActionTypeAttribute.TypeIdentifier. [#2142]

Bug fixes

  • Fixed a bug where PrivateKey() constructor had returned an invalid key less than 32 bytes. [#1696, #2091]
  • (Libplanet.Net) Invalid Uri.UserInfo with multiple colons is now rejected by IceServer(Uri url) constructor and exception is thrown. [#2058, #2116]

CLI tools

  • (Libplanet.Extensions.Cocona) Upgraded Cocona.Lite from 1.6.* to 2.0.*. [#2101]
  • Implemented planet key derive, now you can get public key and address from private key directly! [#2108]
  • (Libplanet.Extensions.Cocona) Removed DerivationCommand class. [#2118]
libplanet - Libplanet 0.38.0

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

Released on June 7th, 2022.

Backward-incompatible API changes

  • (Libplanet.Net) Removed username and credential parameters from IceServer(string, string?, string?) and IceServer(Uri, string?, string?). [#2048, #2049]
  • (Libplanet.Net) Properties IceServer.Username and IceServer.Credential are no longer nullable. [#2048, #2049]

Added APIs

  • (Libplanet.Node) Added NetworkConfig class. [#1946, #2000]
  • (Libplanet.Node) Added NodeConfig class. [#1946, #2000]
  • (Libplanet.Node) Added NodeUtils class. [#2013]
  • (Libplanet.Node) Added SwarmConfig, InitConfig, BootstrapConfig PreloadConfig, and SyncConfig classes. [#2021]

Behavioral changes

  • Added PrivateKey(string) constructor for hexadecimal string. [#2012, #2022]
  • Allow 0x prefix for Address class constructor. DeriveAddress method will remove 0x prefix string. [#2015, #2018]
libplanet - Libplanet 0.37.0

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

Released on May 30th, 2022.

Backward-incompatible API changes

  • (Libplanet.Net) Removed SwarmOptions.BootstrapDialTimeout. Use SwarmOptions.BootstrapOptions.DialTimeout instead. [#2024]
  • (Libplanet.Net) Added Swarm<T>.BootstrapAsync(CancellationToken) which utilizes values stored in BootstrapOptions. [#2024]
  • (Libplanet.Net) Parameter name depth changed to searchDepth for Swarm<T>.BootstrapAsync(IEnumerable<Peer>, TimeSpan?, int, CancellationToken) and made non-optional. [#2024]
  • (Libplanet.Net) Swarm<T>.BootstrapAsync(IEnumerable<Peer>, depth, CancellationToken) removed. [#2024]
  • (Libplanet.Net) Removed SwarmOptions.PreloadDialTimeout. Use SwarmOptions.PreloadOptions.DialTimeout instead. [#2025]
  • (Libplanet.Net) Added Swarm<T>.PreloadAsync(IProgress<PreloadState>, bool, CancellationToken). [#2025]
  • (Libplanet.Net) Changed the order of parameters from Swarm<T>(TimeSpan, IProgresss<PreloadState>, bool, long, CancellationToken) to Swarm<T>( TimeSpan?, long, IProgress<PreloadState>, bool, CancellationToken) with default value for tipDeltaThreshold removed. [#2025]
  • (Libplanet.Net) Parameter name Urls changed to Url for IceServer and no longer accepts multiple Urls for single instance. [#2026]

Added APIs

  • (Libplanet.Net) Added BootstrapOptions class. [#2024]
  • (Libplanet.Net) Added BootstrapOptions property to SwarmOptions. [#2024]
  • (Libplanet.Net) Added PreloadOptions class. [#2025]
  • (Libplanet.Net) Added PreloadOptions property to SwarmOptions. [#2025]

CLI tools

libplanet - Libplanet 0.36.1

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

Released on May 26th, 2022.

  • Fixed Transaction<T>() constructor's bug that it had thrown KeyNotFoundException when a Bencodex dictionary without signature. [#2005]
libplanet - Libplanet 0.36.0

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

Released on May 25th, 2022.

Backward-incompatible API changes

  • Removed InvalidTxPublicKeyException class. [#1164, #1978]
  • (Libplanet.Net) Property SwarmOptions.BlockDownloadTimeout removed. [#1981, #1982]
  • (Libplanet.Net) Swarm<T>.BootstrapAsync(IEnumerable<Peer>, TimeSpan?, TimeSpan?, int, CancellationToken) changed to Swarm<T>.BoostrapAsync( IEnumerable<Peer>, TimeSpan?, int, CancellationToken). Parameter dialTimeout now gets used for both old pingSeedTimeout and findNeigborsTimeout. [#1990]
  • (Libplanet.Net) IProtocol.BootstrapAsync(IEnumerable<BoundPeer>, TimeSpan?, TimeSpan?, int, CancellationToken) changed to IProtocol.BootstrapAsync( IEnumerable<Peer>, TimeSpan?, int, CancellationToken). Parameter dialTimeout now gets used for both old pingSeedTimeout and findNeigborsTimeout. [#1990]

Added APIs

Behavioral changes

  • Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[]) constructor became to ignore its second parameter Address signer. Instead, Transaction<T>.Signer property is now automatically derived from its PublicKey. [#1164, #1978]

Bug fixes

  • Fixed InvalidOperationException thrown by PublicKey.Verify() method if signature is a default(ImmutableArray<byte>). Instead, it silently returns false now. [#1978]
  • Fixed NullReferenceException thrown by ByteUtil.Hex(in ImmutabelArray<byte>) method if a default(ImmutableArray<byte>) is present. Instead, it silently returns an empty string now. [#1978]
  • Fixed a TxId(byte[]) constructor's bug where ParamName and Message of ArgumentOutOfRangeException it had thrown had been reversed. [#1978]

CLI tools

libplanet - Libplanet 0.35.1

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

Released on May 23rd, 2022.

Bug fixes

  • (Libplanet.Net) Wrongly assigned default value to TimeoutOptions.PreloadDialTimeout fixed. [#1983]
libplanet - Libplanet 0.35.0

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

Released on May 20th, 2022.

Deprecated APIs

  • (Libplanet.Net) Unused property SwarmOptions.PollInterval removed. [#1962]

Backward-incompatible API changes

  • BlockCompletion<TPeer, TAction>.Complete() no longer accepts neither parmeter TimeSpan singleSessionTimeout nor int millisecondsSingleSessionTimeout to regulate a single session length. [#1961]
  • (Libplanet.Net) General API changes made to Swarm<T>.BootstrapAsync(), Swarm<T>.PreloadAsync(), and Swarm<T>.StartAsync(). [#1962]
    • Swarm<T>.BootstrapAsync(IEnumerable<Peer>, double, double, int, CancellationToken) replaced with Swarm<T>.BootstrapAsync(IEnumerable<Peer>, int, CancellationToken) which uses default values provided by SwarmOptions for pingSeedTimeout and findPeerTimeout.
    • Swarm<T>.StartAsync(int, int, int CancellationToken) replaced with Swarm<T>.StartAsync(CancellationToken) which uses default values provided by SwarmOptions for millisecondsDialTimeout, millisecondsBroadcastBlockInterval and millisecondsBroadcastTxInterval.
    • Swarm<T>.PreloadAsync(IProgress<PreloadState>, bool, long, CancellationToken) overload method added and Swarm<T>.PreloadAsync(TimeSpan?, IProgress<PreloadState>, bool long, CancellationToken) changed to Swarm<T>.PreloadAsync( TimeSpan, IProgress<PreloadState>, bool, long, CancellationToken)
  • (Libplanet.Net) TimeoutOptions property added to SwarmOptions with all timeout related options moved from SwarmOptions to TimeoutOptions. [#1957, #1962]

Added APIs

  • Added StoreLoader delegate. [#1359, #1953, #1955]
  • Added StoreLoaderAttribute class. [#1359, #1953, #1955]
  • Added TrieStateStore.Secure property. [#1955]
  • Added NameValueCollectionExtensions static class. [#1955]
  • Type support for Guid added to DataModel. [#1959, #1960]
  • TimeoutOptions class added. [#1957, #1962]
  • SwarmOptions.BlockBroadcastInterval and SwarmOptions.TxBroadcastInterval properties added. [#1962]
  • TimeSpanExtensions.Multiply() method added. [#1966]

Behavioral changes

  • DefaultStore and DefaultKeyValueStore-backed TrieStateStore now can be instantiated with URI scheme default+file: using StoreLoaderAttribute.LoadStore() method. [#1359, #1953, #1955]
  • MemoryStore and MemoryKeyValueStore-backed TrieStateStore now can be instantiated with URI scheme memory: using StoreLoaderAttribute.LoadStore() method. [#1359, #1953, #1955]
  • (Libplanet.RocksDBStore) RocksDBStore and RocksDBKeyValueStore-backed TrieStateStore now can be instantiated with URI scheme rocksdb+file: using StoreLoaderAttribute.LoadStore() method. [#1359, #1953, #1955]

CLI tools

  • The following store URI schemes are deprecated: [#1573, #1955]
    • default: Use default+file instead.
    • rocksdb: Use rocksdb+file instead.