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 5.1.3 Latest Release

Published by github-actions[bot] 3 months ago

Released on July 30, 2024.

  • (Libplanet.Explorer) Removed code that was used in development. [#3898]
libplanet - Libplanet 5.2.0

Published by github-actions[bot] 3 months ago

Released on July 23, 2024.

Backward-incompatible API changes

  • Removed IBlockPolicy.BlockAction property. [#3701]
  • Added IBlockPolicy.PolicyActionsRegistry property. [#3701]
  • BlockPolicy constructor now requires policyActionsRegistry parameter instead of the blockAction parameter. [#3701, #3748]
  • (Libplanet.Action) Removed PolicyBlockActionGetter delegate. [#3701, #3748]
  • (Libplanet.Action) ActionEvaluator constructor requires PolicyActionsRegistry parameter instead of the policyBlockActionGetter parameter. [#3701, #3748]
  • (Libplanet.Action) Renamed IActionContext.BlockAction property to IActionContext.IsPolicyAction. [#3764]

Added APIs

  • (Libplanet.Store) Added MerkleTrie.GenerateProof() method. [#3870]
  • (Libplanet.Store) Added MerkleTrie.ValidateProof() method. [#3870]
  • (Libplanet.Action) Added PolicyActionsRegistry class. [#3748]
libplanet - Libplanet 5.1.2

Published by github-actions[bot] 3 months ago

Released on July 17, 2024.

  • Fix an issue where currency does not work correctly in dotnet6. [#3880]
  • Fix an issue where evidence queries cause errors in the explorer. [#3883]
libplanet - Libplanet 5.1.1

Published by github-actions[bot] 3 months ago

Released on July 15, 2024.

  • Fixed an issue with the evidence hash changing depending on the version. [#3874]
libplanet - Libplanet 5.1.0

Published by github-actions[bot] 3 months ago

Released on July 11, 2024.

Backward-incompatible API changes

  • (Libplanet.Explorer) Added ValidatorPower field to VoteType. [#3737, #3813]
  • (Libplanet.Types) Added ValidatorPower property to IVoteMetadata interface and its implementations. [#3737, #3813]
  • (Libplanet.Types) Added IBlockMetadata.EvidenceHash property and the parameters required by the derived class's properties and constructors have been added. Affected classes are Block, BlockContent, BlockHeader, BlockMetadata, PreEvaluationBlockHeader. [#3696]
  • (Libplanet.Types) Added IBlockContent.Evidence property and the parameters required by the derived class's properties and constructors have been added. Affected classes are Block, BlockContent, BlockHeader, PreEvaluationBlock. [#3696]
  • (Libplanet) Added IBlockPolicy.GetMaxEvidencePendingDuration method. [#3696]

Added APIs

  • (Libplanet.Types) Added InvalidBlockEvidenceHashException class. [#3696]
  • (Libplanet.Types) Added InvalidBlockEvidencePendingDurationException class. [#3696]
  • (Libplanet.Types) Added EvidenceBase abstract class. [#3696]
  • (Libplanet.Types) Added DuplicateVoteEvidence class. [#3696]
  • (Libplanet.Types) Added DuplicateVoteException class. [#3696]
  • (Libplanet.Types) Added EvidenceContext class. [#3696]
  • (Libplanet.Types) Added EvidenceException class. [#3696]
  • (Libplanet.Types) Added EvidenceId class. [#3696]
  • (Libplanet.Types) Added IEvidenceContext class. [#3696]
  • (Libplanet.Types) Added InvalidEvidenceException class. [#3696]
  • (Libplanet.Net) Added EvidenceCompletion class. [#3696]
  • (Libplanet.Store) Added IStore.IteratePendingEvidenceIds. method. [#3696]
  • (Libplanet.Store) Added IStore.GetPendingEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.GetCommittedEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.PutPendingEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.PutCommittedEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.DeletePendingEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.DeleteCommittedEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.ContainsPendingEvidence. method. [#3696]
  • (Libplanet.Store) Added IStore.ContainsCommittedEvidence. method. [#3696]
  • (Libplanet) Added BlockChain.GetPendingEvidence. method. [#3696]
  • (Libplanet) Added BlockChain.GetCommittedEvidence. method. [#3696]
  • (Libplanet) Added BlockChain.AddEvidence. method. [#3696]
  • (Libplanet) Added BlockChain.CommitEvidence. method. [#3696]
  • (Libplanet) Added BlockChain.IsEvidencePending. method. [#3696]
  • (Libplanet) Added BlockChain.IsEvidenceCommitted. method. [#3696]
  • (Libplanet) Added BlockChain.IsEvidenceExpired. method. [#3696]
  • (Libplanet) Added BlockChain.DeletePendingEvidence. method. [#3696]
  • (Libplanet.Action) Added IActionContext.Evidence. property. [#3696]
  • (Libplanet.Net) Added Swarm.BroadcastEvidence. property. [#3696]
  • (Libplanet.Net) Added Context.CollectEvidenceExceptions. property. [#3696]

Dependencies

The entire project is now defined by common properties in the Directory.Build.props file. The Directory.Build.props file is located at the root and in the src, tools, test path.

The project structure and affected Directory.Build.props locations are shown below.

┌ Directory.Build.props
├ src
│  ├ Directory.Build.props
│  ├ Libplanet
│  ├ Libplanet.Action
│  ├ Libplanet.Common
│  ├ Libplanet.Crypto.Secp256k1
│  ├ Libplanet.Crypto
│  ├ Libplanet.Net
│  ├ Libplanet.RocksDBStore
│  ├ Libplanet.Store.Remote
│  ├ Libplanet.Store
│  ├ Libplanet.Stun
│  └ Libplanet.Types
├ test
│  ├ Directory.Build.props
│  ├ Libplanet.Action.Tests
│  ├ Libplanet.Analyzers.Tests
│  ├ Libplanet.Crypto.Secp256k1.Tests
│  ├ Libplanet.Explorer.Cocona.Tests
│  ├ Libplanet.Explorer.Tests
│  ├ Libplanet.Extensions.Cocona.Tests
│  ├ Libplanet.Mocks
│  ├ Libplanet.Net.Tests
│  ├ Libplanet.RocksDBStore.Tests
│  ├ Libplanet.Store.Remote.Tests
│  ├ Libplanet.Stun.Tests
│  └ Libplanet.Tests
└ tools
   ├ Directory.Build.props
   ├ Libplanet.Analyzers
   ├ Libplanet.Benchmarks
   ├ Libplanet.Explorer.Cocona
   ├ Libplanet.Explorer.Executable
   ├ Libplanet.Explorer
   ├ Libplanet.Extensions.Cocona
   └ Libplanet.Tools

The default SDK version for the project has been bumped up to .NET 6.0. The list of supported SDKs is as follows

  • netstandard2.0
  • netstandard2.1
  • netcoreapp3.1
  • net6.0"

Support for netstandard2.0 is coming to an end soon, please note that projects using netstandard2.0 will be deprecated.

The VersionPrefix property has been moved from the src/Libplanet/Libplanet.csproj file to the Directory.Build.props file.

libplanet - Libplanet 5.0.0

Published by github-actions[bot] 4 months ago

Released on July 2, 2024.

Deprecated APIs

  • BlockChain.DetermineGenesisStateRootHash() has been removed. [#3811]
  • BlockChain.EvaluateGenesis() has been removed. [#3811]
  • BlockChain.DetermineBlockStateRootHash() has been removed. [#3811]

Backward-incompatible API changes

  • (Libplanet.Action) IBlockChainStates.GetWorldState(BlockHash?) does not accept null parameter any more. [#3811]
  • Bumped BlockMetadata.CurrentProtocolVersion to 8. [#3811]
  • BlockChain.EvaluateBlock() accepts Block instead of IPreEvaluationBlock. [#3811]
  • BlockChain.ProposeGenesisBlock() receives parameter HashDigest<SHA256>? stateRootHash. [#3811]
  • BlockChain.ProposeGenesisBlock() does not receive parameter IActionEvaluator actionEvaluator any more. [#3811]
  • BlockChain.ProposeBlock() receives parameter HashDigest<SHA256> stateRootHash. [#3811]
  • (Libplanet.Net) Changed Context() to accept additional BlockCommit? typed argument. Removed lastCommit parameter from Context.Start(). [#3833, #3845]
  • (Libplanet.Net) Changed Context.Start() to throw an InvalidOperationException when Context is not in a valid state. [#3846]
  • (Libplanet.Net) Removed IConsensusMessageCommunicator parameter from Context(). [#3848, #3849]
  • (Libplanet.Net) Added Running property to ConsensusContext. [#3851]
  • (Libplanet.Net) Added Start() method to ConsensusContext. [#3851]
  • (Libplanet.Net) Changed NewHeight() to throw a NullReferenceException if it is called while its internal BlockChain is in an invalid state. [#3851]
  • (Libplanet.Net) Removed Null value from ConsensusStep enum. [#3851]

Added APIs

  • Added BlockChain.DetermineNextBlockStateRootHash() method. [#3811]

Behavioral changes

  • Context.ProcessHeightOrRoundUponRules() now appends block asynchronously, as a manner of fire-and-forget. [#3808]
  • BlockHeader.StateRootHash now means state root hash calculated by BlockChain.DetermineNextBlockStateRootHash(previousBlockHash). [#3811]
libplanet - Libplanet 5.0.0-alpha.4

Published by github-actions[bot] 4 months ago

To be released.

Deprecated APIs

  • (Libplanet) BlockChain.DetermineGenesisStateRootHash() has been removed. [#3811]
  • (Libplanet) BlockChain.EvaluateGenesis() has been removed. [#3811]
  • (Libplanet) BlockChain.DetermineBlockStateRootHash() has been removed. [#3811]

Backward-incompatible API changes

  • (Libplanet.Action) IBlockChainStates.GetWorldState(BlockHash?) does not accept null parameter any more. [#3811]
  • Bumped BlockMetadata.CurrentProtocolVersion to 8. [#3811]
  • (Libplanet) BlockChain.EvaluateBlock() accepts Block instead of IPreEvaluationBlock. [#3811]
  • (Libplanet) BlockChain.ProposeGenesisBlock() receives parameter HashDigest<SHA256>? stateRootHash. [#3811]
  • (Libplanet) BlockChain.ProposeGenesisBlock() does not receive parameter IActionEvaluator actionEvaluator any more. [#3811]
  • (Libplanet) BlockChain.ProposeBlock() receives parameter HashDigest<SHA256> stateRootHash. [#3811]
  • (Libplanet) Added BlockChain.GetNextWorldState() and BlockChain.GetNextWorldState(BlockHash?) methods. [[#3821]]

Backward-incompatible network protocol changes

Backward-incompatible storage format changes

Added APIs

  • (Libplanet.Store) Added IStore.GetNextStateRootHash() method. [#3811]
  • (Libplanet.Store) Added IStore.PutNextStateRootHash() method. [#3811]
  • (Libplanet.Store) Added IStore.DeleteNextStateRootHash() method. [#3811]
  • (Libplanet) Added BlockChain.DetermineNextBlockStateRootHash() method. [#3811]

Behavioral changes

  • BlockHeader.StateRootHash now means state root hash calculated by BlockChain.DetermineNextBlockStateRootHash(previousBlockHash). [[#Sloth]]
  • IBlockChainStates.GetWorldState(BlockHash) now means the IWorldState before state transition from the Block. [#3811]
  • Context.ProcessHeightOrRoundUponRules() now appends block asynchronously, as a manner of fire-and-forget. [[#3808]]

Bug fixes

Dependencies

CLI tools

libplanet - Libplanet 5.0.0-alpha.3

Published by github-actions[bot] 4 months ago

To be released.

Deprecated APIs

  • (Libplanet) BlockChain.DetermineGenesisStateRootHash() has been removed. [#3811]
  • (Libplanet) BlockChain.EvaluateGenesis() has been removed. [#3811]
  • (Libplanet) BlockChain.DetermineBlockStateRootHash() has been removed. [#3811]

Backward-incompatible API changes

  • (Libplanet.Action) IBlockChainStates.GetWorldState(BlockHash?) does not accept null parameter any more. [#3811]
  • Bumped BlockMetadata.CurrentProtocolVersion to 8. [#3811]
  • (Libplanet) BlockChain.EvaluateBlock() accepts Block instead of IPreEvaluationBlock. [#3811]
  • (Libplanet) BlockChain.ProposeGenesisBlock() receives parameter HashDigest<SHA256>? stateRootHash. [#3811]
  • (Libplanet) BlockChain.ProposeGenesisBlock() does not receive parameter IActionEvaluator actionEvaluator any more. [#3811]
  • (Libplanet) BlockChain.ProposeBlock() receives parameter HashDigest<SHA256> stateRootHash. [#3811]
  • (Libplanet) Added BlockChain.GetNextWorldState() and BlockChain.GetNextWorldState(BlockHash?) methods. [[#3821]]

Backward-incompatible network protocol changes

Backward-incompatible storage format changes

Added APIs

  • (Libplanet.Store) Added IStore.GetNextStateRootHash() method. [#3811]
  • (Libplanet.Store) Added IStore.PutNextStateRootHash() method. [#3811]
  • (Libplanet.Store) Added IStore.DeleteNextStateRootHash() method. [#3811]
  • (Libplanet) Added BlockChain.DetermineNextBlockStateRootHash() method. [#3811]

Behavioral changes

  • BlockHeader.StateRootHash now means state root hash calculated by BlockChain.DetermineNextBlockStateRootHash(previousBlockHash). [[#Sloth]]
  • IBlockChainStates.GetWorldState(BlockHash) now means the IWorldState before state transition from the Block. [#3811]
  • Context.ProcessHeightOrRoundUponRules() now appends block asynchronously, as a manner of fire-and-forget. [[#3808]]

Bug fixes

Dependencies

CLI tools

libplanet - Libplanet 4.6.1

Published by github-actions[bot] 4 months ago

Released on June 11, 2024.

libplanet - Libplanet 4.5.2

Published by github-actions[bot] 4 months ago

Released on June 10, 2024.

  • (Libplanet.Explorer) Added ProtocolVersion field to BlockType. [#3810]
libplanet - Libplanet 4.6.0

Published by github-actions[bot] 5 months ago

Released on May 27, 2024.

Due to changes in #3789, a network ran with a prior version may not be compatible with this version. The native implementation of IActionEvaluator, which is ActionEvaluator, no longer supports evaluation of PoW Blocks. That is, it is no longer possible to reconstruct states with valid state root hashes purely from past Blocks that includes PoW Blocks.

Deprecated APIs

  • (Libplanet.Common) Removed Nonce struct. [#3793, #3794]
  • Removed AtomicActionRenderer class. [#3795]

Backward-incompatible API changes

  • (Libplanet.Action) Changed ActionEvaluate.Evaluate() to no longer accept IPreEvaluationBlock with a protocol version less than BlockMetadata.PBFTProtocolVersion. [#3789]
  • (Libplanet.Action) Changed the description of IActionEvaluate.Evaluate() so that it may throw BlockProtocolVersionNotSupportedException if its implementation is not able to handle IPreEvaluationBlock with certain BlockMetadata.ProtocolVersions. [#3789]
  • (Libplanet.Types) Removed nonce parameter from BlockMetadata.DerivePreEvaluationHash() and BlockMetadata.MakeCandidateData() methods. [#3793, #3794]
  • (Libplanet.Explorer.Executable) Removed unused difficultyBoundDivisor parameter for the executable and removed Options.DifficultyBoundDivisor property. [#3796]
  • (Libplanet.Explorer) Added balance, totalSupply, and validatorSet queries to WorldStateType. [#3792, #3798]
  • (Libplanet.Explorer) Deprecated balance, balances, totalSupply and validatorSet query from AccountStateType. [#3792, #3798]
  • (Libplanet.Explorer) Changed totalSupply query under StateQuery to no longer throw an Exception and return a zero amount instead. [#3799]

Added APIs

  • (Libplanet.Action) Added BlockProtocolVersionNotSupportedException class. [#3789]
  • (Libplanet.Mocks) Added MockBlockChainStates class. [#3799]
libplanet - Libplanet 4.5.1

Published by github-actions[bot] 5 months ago

Released on May 27, 2024.

libplanet - Libplanet 4.5.0

Published by github-actions[bot] 5 months ago

Released on May 14, 2024.

Due to changes in #3780 and #3783, a network ran with a prior version may not be compatible with this version. Regarding #3780, a network that ran with an IAction that has used GetTotalSupply() with its execution result dependent on its value may not be compatible. Regarding #3783, a network that ran with an IAction that has either used MintAsset() and BurnAsset() with its execution result dependent on handling of a possible Exception thrown by these methods may not be compatible.

Backward-incompatible API changes

  • (Libplanet.Types) Updated BlockMetadata.CurrentProtocolVersion from 6 to 7. [#3769]
  • (Libplanet.Store) Added IterateSubTrieValues(KeyBytes) and IterateSubTrieNodes(KeyBytes) methods to MerkleTrie. [#3774]
  • (Libplanet.Types) Added BlockMetadata.CurrencyAccountProtocolVersion. [#3775]
  • (Libplanet.Mocks) Removed MockWorldState.ToModern() and MockWorldState.SetTotalSupply() methods. [#3778]
  • (Libplanet.Action) Removed TotalSupplyNotTrackableException class. [#3780]
  • (Libplanet.Action) IWorldState.GetTotalSupply() no longer throws a TotalSupplyNotTrackableException but returns a zero amount of corresponding FungibleAssetValue. [#3780]
  • (Libplanet.Action) Changed the precednce for the types of Exceptions that may be thrown by IWorld.MintAsset() and IWorld.BurnAsset().

Added APIs

  • (Libplanet.Action) Added CurrencyAccount class. [#3779]

Behavioral changes

  • (Libplanet.Mocks) MockWorldState.SetBalance() now automatically updates the total supply of the provided Currency. [#3778]
libplanet - Libplanet 4.4.2

Published by github-actions[bot] 6 months ago

Released on April 29, 2024.

  • (Libplanet.Explorer) Added KeyBytesType and TrieType. [#3763]
  • (Libplanet.Explorer) Added RawStateQuery. [#3763]
libplanet - Libplanet 4.4.1

Published by github-actions[bot] 6 months ago

Released on April 18, 2024.

libplanet - Libplanet 4.3.1

Published by github-actions[bot] 6 months ago

Released on April 18, 2024.

libplanet - Libplanet 4.4.0

Published by github-actions[bot] 6 months ago

Released on April 17, 2024.

Backward-incompatible API changes

  • (Libplanet.Action) Removed IWorld.SetValidator() extension method. Use IWorld.SetValidatorSet() extension method instead. [#3735]
  • (Libplanet.Types) Renamed BlockMetadata.PoWProtocolVersion to BlockMetadata.PBFTProtocolVersion and BlockMetadata.LegacyStateVersion to BlockMetadata.WorldStateProtocolVersion while increasing each value by 1. [#3736]
  • (Libplanet.Store) Changed the type of TrieMetadata.Version from BigInteger to int. [#3738]
  • (Libplanet.Store) Changed TrieMetadata to throw an ArgumentException when trying to create an instance with an invalid version. [#3738]
  • (Libplanet.Action) Added IWorldState.Version interface property. [#3739]
  • (Libplanet.Types) Updated BlockMetadata.CurrentProtocolVersion from 5 to 6. [#3741]
  • (Libplanet.Types) Added BlockMetadata.TransferFixProtocolVersion, BlockMetadata.SignatureProtocolVersion, and BlockMetadata.TransactionOrderingFixProtocolVersion constants. [#3742]
  • (Libplanet.Action) Removed ReservedAddresses.FungibleAssetAccount. [#3745]
  • (Libplanet.Action) Changed ReservedAddresses.ValidatorSetAccount's value from 0x1000000000000000000000000000000000000002 to 0x100000000000000000000000000000000000001. [#3745]

Added APIs

  • (Libplanet.Action) Added ValidatorSetAccount class. [#3745]
  • (Libplanet.Explorer) Added WorldState.version field. [#3746]
libplanet - Libplanet 4.3.0

Published by github-actions[bot] 6 months ago

Released on April 8, 2024.

Due to changes in #3728, a network ran with a prior version may not be compatible with this version, specifically those that ran with IActions that has allowed negative balances through TransferAssets() with allowNegativeBalance as true.

Backward-incompatible API changes

  • (Libplanet.Action) Added Txs property of type IReadOnlyList<ITransaction>? to IActionContext. [#3713]
  • (Libplanet.Action) Removed TotalFungibleAssets property from IWorld. [#3714]
  • (Libplanet.Action) Changed GetBalance(), GetTotalSupply(), and GetValidatorSet() of IWorldState to extension methods. [#3715]
  • (Libplanet.Action) Changed MintAsset(), BurnAsset(), TransferAsset(), and SetValidator() of IWorld to extension methods. [#3715]
  • (Libplanet.Action) Removed allowNegativeBalance parameter from IWorld.TransferAsset() extension method. [#3725, #3728]
  • (Libplanet.Store) Removed journal, indexCacheSize, and flush parameters from DefaultStore's constructor. [#3729]

Dependencies

libplanet - Libplanet 4.2.0

Published by github-actions[bot] 7 months ago

Released on March 22, 2024.

Backward-incompatible API changes

  • (Libplanet.Action) Moved GetBalance() and GetTotalSupply() methods from IAccountState to IWorldState. [#3694, #3697]
  • (Libplanet.Action) Moved MintAsset(), BurnAsset(), and TransferAsset() methods from IAccount to IWorld. [#3694, #3697]
  • (Libplanet.Action) Removed TotalSupplyDiff, FungibleAssetValueDiff, and ValidatorDiff properties from AccountDiff. [#3694, #3697]
  • (Libplanet.Action) Removed Uncommitted property and CommitAccount() method from IWorldDelta. [#3694, #3699]
  • (Libplanet.Action) Moved GetValidatorSet() from IAccountState to IWorldState. [#3702]
  • (Libplanet.Action) Moved SetValidator() from IAccount to IWorld. [#3702]

Added APIs

  • Added Libplanet.Mocks project. [#3642]
libplanet - Libplanet 4.1.0

Published by github-actions[bot] 8 months ago

Released on March 8, 2024.

Backward-incompatible API changes

  • Removed the '#nullable disable' from 3 projects (Action, Common, Explorer). [#3622]
  • Removed the '#nullable disable' from the Libplanet.Store project. [#3644]
  • Removed the '#nullable disable' from the Libplanet.RocksDBStore project. [#3651]
  • Removed BaseIndex class and changed BlockSet base class from BaseIndex<BlockHash, Block> to IReadOnlyDictionary<BlockHash, Block>. [#3686]

Backward-incompatible network protocol changes

  • (Libplanet.Net) Changed some types due to removal of 'nullable keyword'. [#3669]
    • Changed blocks parameter type of Branch class constructor from IEnumerable<(Block, BlockCommit)> to IEnumerable<(Block, BlockCommit?)>.
    • Changed AppProtocolVersion.Extra field type from IValue to IValue?.
    • Changed extra parameter type of AppProtocolVersion class constructor from IValue to IValue?.
    • Changed extra parameter type of AppProtocolVersion.Sign method from IValue to IValue?.

Added APIs

  • (Libplanet.Store.Remote) Introduce Libplanet.Store.Server.RemoteKeyValueService [#3688]
  • (Libplanet.Store.Remote) Introduce Libplanet.Store.Client.RemoteKeyValueStore [#3688]

Behavioral changes

  • (Libplanet.Store) Optimized ITrie.IterateNodes() to greatly reduce the amount of memory used. [#3687]