Blockchain in C#/.NET for on-chain, decentralized gaming
LGPL-2.1 License
Bot releases are visible (Hide)
Published by github-actions[bot] over 1 year ago
Released on June 7, 2023.
IBlockChainStates.GetTrie()
interface method. [#3168]
PolymorphicAction<T>
class. [#3193]
BlockChain.Create()
to accept IActionEvaluator
interface instead of ActionEvaluator
object. [#3195]
blockAction
parameter from BlockChain.EvaluateGenesis()
, BlockChain.DetermineGenesisStateRootHash()
, and BlockChain.ProposeGenesisBlock()
methods. [#3195]
Published by github-actions[bot] over 1 year ago
Released on May 19, 2023.
PreloadState
as BlockSyncState
. [#3154]
Swarm<T>.PreloadAsync
's parameter IProgress<PreloadState> progress
as IProgress<BlockSyncState> progress
. [#3154]
IAccountStateDelta
and relations interface to Libplanet.State
namespace (from Libplanet.Action
namespace). [#3173]
BlockChain<T>()
constructors to explicitly require an IBlockChainStates
and an IActionEvaluator
. [#3172]
BlockChain<T>.DetermineGenesisStateRootHash()
, BlockChain<T>.EvaluateGenesis()
, and BlockChain<T>.ProposeGenesisBlock()
to explicitly require IActionEvaluator
. [#3172]
T
from BlockChain<T>
class. [#3182]
T
from IBlockPolicy<T>
interface. [#3182]
T
from IStagePolicy<T>
interface. [#3182]
T
from Context<T>
class. [#3183]
T
from ConsensusContext<T>
class. [#3183]
T
from ConsensusReactor<T>
class. [#3183]
T
from BlockCandidateTable<T>
class. [#3184]
T
from TxCompletion<T>
class. [#3184]
T
from Swarm<T>
class. [#3184]
T
requiring T
as IAction
from all classes. [#3185]
Gossip
became to store the MessageId
s received through the HaveMessage
instead of immediately replying to them, and send the WantMessage
requests all at once during each HeartbeatTask
. #3152
Swarm<T>.PreloadAsync()
use PullBlocksAsync()
and ConsumeBlockCandidates()
. [#3154]
Swarm<T>.PreloadAsync()
uses BlockCandidateTable<T>
to cache downloaded Block
s, instead of storing them on forked BlockChain<T>
. [#3154]
Swarm<T>.PullBlocksAsync()
and Swarm<T>.GetDemandBlockHashes()
iterates using new parameter chunkSize
. [#3154]
Swarm<T>.ConsumeBlockCandidates()
repeats iff new parameter checkInterval
is not null. [#3154]
Swarm<T>.ConsumeBlockCandidates()
does not renders if new parameter render
is false
. [#3154]
Swarm<T>.PullBlocksAsync()
and Swarm<T>.GetDemandBlockHashes()
receives new parameter IProgress<BlockSyncState> progress
and will report progress to it, if it's given. [#3154]
BlockDemandTable
and BlockCandidateTable
to constructor of Swarm<T>
from Swarm<T>.StartAsync()
. [#3154]
Published by github-actions[bot] over 1 year ago
Released on May 17, 2023.
TransactionQuery
could not properly retrieve actions. [#3174]
Published by github-actions[bot] over 1 year ago
Released on May 16, 2023.
StaticActionLoader
class. Use SingleActionLoader
instead. [#3148]
Mint
and Transfer
class. [#3159]
T
from Transaction.Create<T>()
and PreEvaluationBlock.Evaluate<T>()
. [#3122]
IActionRenderer<T>
's methods was changed. [#3117]
RenderAction(IAction, IActionContext, IAccountStateDelta)
method was changed to RenderAction(IValue, IActionContext, IAccountStateDelta)
.RenderActionError(IAction, IActionContext, Exception)
method was changed to RenderActionError(IValue, IActionContext, Exception)
.SingleActionLoader
, TypedActionLoader
, and IndexedActionLoader
classes. [#3148]
trieGetter
parameter from ActionEvaluator
constructor. [#3149]
IBlockChainStates.GetTrie()
interface method. [#3149]
BlockChain<T>.Create()
static method now requires actionEvaluator
parameter explicitly. [#3149]
IBlockPolicy.NativeTokens
property. [#3153]
NonNativeTokenException
class.IActionContext.IsNativeToken()
method.nativeTokenPredicate
parameter from ActionEvaluator()
nativeTokenPredicate
parameter from all BlockChain<T>
's methods.BlockPolicyType<T>
class.T
from IRenderer<T>
and all its implementations. [#3163]
IActionContext.GenesisHash
property. [#3164]
genesisHash
parameter from ActionEvaluator()
. [#3164]
IActionContext.GasUsed()
method. [#3144]
IActionContext.GasLimit()
method. [#3144]
PolymorphicAction<T>.ReloadLoader()
static method. [#3158]
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Released on May 9, 2023.
TxActionList
. [#3083]
TxActionList.FromBencodex<T>()
method.TxActionList.ToBencodex()
from Dictionary
to IValue
.IRenderer<T>.RenderReorg()
, IRenderer<T>.RenderReorgEnd()
, IActionRenderer<T>.UnrenderAction()
, and IActionRenderer<T>.UnrenderActionError()
. [#3092]
NonblockRenderer
, NonblockActionRenderer
, DelayedRenderer
, and DelayedActionRenderer
classes. [#3098]
render
parameter from all Swarm<T>.PreloadAsync()
overload methods. No rendering is done during the preloading phase. [#3108]
TxActionList
now implements IBencodable
interface. [#3110]
FromBencodex()
static method; use TxActionList(IValue)
constructor instead.ToBencodex()
method; use TxActionList.Bencoded
instead.TxActionList
now implements IEnumerable<IValue>
instead of IEnumerable<IAction>
. [#3110]
TxSystemAction.SystemAction
to return an IValue
.TxCustomActions.CustomActions
to return an IImmutableList<IValue>
.TxActionList
's JSON representation has changed. It no longer has "type"
field. [#3110]
ActionTypeAttribute.TypeIdentifier
from string
to IValue
. [#3111]
ActionTypeAttribute.ValueOf()
from string?
to IValue?
. [#3111]
IActionTypeLoader.Load()
from IDictionary<string, Type>
to IDictionary<IValue, Type>
. [#3111]
IReadOnlyList<ActionEvaluation>
to IReadOnlyList<IActionEvaluation>
. [#3089]
BlockChain<T>.DetermineGenesisStateRootHash()
method's evaluations
parameter type.BlockChain<T>.DetermineBlockStateRootHash()
method's evaluations
parameter type.BlockChain<T>.EvaluateBlock()
method's return type.BlockChain<T>.EvaluateGenesis()
method's return type.BlockChain<T>.MakeTransaction(PrivateKey, IAction, IImmutableSet<Address>, DateTimeOffset?)
. [#3116]
Transaction<T>.Create(long, PrivateKey, BlockHash?, IAction, IImmutableSet<Address>?, DateTimeOffset?)
. [#3116]
Transaction<T>.Create(long, PrivateKey, BlockHash?, IEnumerable<IValue>, IImmutableSet<Address>?, DateTimeOffset?)
. [#3116]
ITransaction.SystemAction
and ITransaction.CustomActions
. Use ITxInvoice.Actions
instead. [#3116]
TxActionList
class. [#3116]
TxActionList
class to be sealed
from abstract
. TxActionList
is pretty much the old TxCustomActionsList
.TxActionList
to be more simple.TxSystemActionList
and TxCustomActionsList
Transaction<T>
to Transaction
to be non-generic. [#3121]
Transaction.Create<T>()
now requires type parameter T
.Block<T>
to Block
to be non-generic. [#3123]
IBlockContent<T>
interface. Use IBlockContent
instead. Also changed IBlockContent.IImmutableSet<ITransaction>
to IBlockContent.ReadOnlyList<ITransaction>
.BlockContent<T>
to BlockContent
.IPreEvaluationBlock<T>
interface. Use IPreEvaluationBlock
instead.PreEvaluationBlock<T>
to PreEvaluationBlock
.
PreEvaluationBlock.Evaluate<T>()
now requires type parameter T
.PreEvaluationBlock.Evaluate<T>()
method. [#3127]
IActionTypeLoader
to IActionLoader
. [#3135]
IActionLoader.Load(long, IValue)
interface method.ActionTypeLoaderContext
class. Use long
instead.StaticActionTypeLoader
to StaticActionLoader
.IActionEvaluator.IActionLoader
property. [#3136]
IActionLoader.LoadAction()
to throw InvalidActionException
instead of ArgumentException
when an action cannot be instantiated. [#3140]
IActionEvaluator
interface. [#3082]
ActionTypeAttribute(int)
constructor. [#3111]
IActionEvaluation
interface. [#3089]
Mint
, Transfer
, and Initialize
. [#3112]
InvalidActionException
class. [#3140]
BlockChain<T>
to ignore IRenderer<T>.RenderReorg()
, IRenderer<T>.RenderReorgEnd()
, IActionRenderer<T>.UnrenderAction()
, and IActionRenderer<T>.UnrenderActionError()
, i.e., these interface methods are no longer invoked by a BlockChain<T>
. [#3087]
Context<T>.ConsumeMutation()
to iteratively call Context<T>.ProcessGenericUponRules()
itself, instead of producing submutations of it. [#3137]
BlockChain<T>
could not propose if a certain type of invalid Transaction
was staged. [#3136]
Context<T>
would completely halt if a Block
with an IValue
as one of its action that cannot be instantiated via its IActionLoader
. [#3140]
Published by github-actions[bot] over 1 year ago
Released on May 4, 2023.
Published by github-actions[bot] over 1 year ago
Released on May 3, 2023.
Published by github-actions[bot] over 1 year ago
Released on April 18, 2023.
RawPrivateKey.publicKey
property in favour of RawPrivateKey.getPublicKey()
async method. [#3061]
AwsKmsAccount.publicKey
in favour of AwsKmsAccount.getPublicKey()
async method. [#3061]
TxMetadata
class. [#1164, #2986]
Transaction<T>(TxMetadata, IAction, byte[])
constructor.Transaction<T>(TxMetadata, IEnumerable<T>, byte[])
constructor.ITransaction
interface in general. [#1164, #2986]
ITransaction
now inherits IUnsignedTx
interface instead of having properties such as GenesisHash
, UpdatedAddresses
, Timestamp
, Nonce
, Signer
, and PublicKey
.SystemAction
property is replaced by Actions
property which is inherited from IUnsignedTx
interface.CustomActions
property is replaced by Actions
property which is inherited from IUnsignedTx
interface.Transaction<T>
no more accept empty Signature
as a valid state. Instead, you should use UnsignedTx
class to represent an unsigned transaction. [#1164, #2986]
Transaction<T>(long, Address, PublicKey, BlockHash?, IImmutableSet<Address>, DateTimeOffset, IEnumerable<T>, byte[])
constructor.Transaction<T>.CreateUnsigned()
static method.Transaction<T>.Validate()
method.sign
parameter from Transaction<T>.Serialize()
method.validate
parameter from Transaction<T>.Deserialize()
method.Transaction<T>
now has Actions
in a uniform way regardless they are custom actions or system actions, through TxActionList
abstract class. [#1164, #2986]
Transaction<T>.Actions
property from IImmutableList<IAction>
to TxActionList
, which is also an IReadOnlyList<IAction>
. The property once was deprecated in favour of Transaction<T>.CustomActions
and Transaction<T>.SystemAction
, but now it replaces them both.Transaction<T>.CustomActions
property.Transaction<T>.SystemAction
property.Transaction<T>(Bencodex.Types.Dictionary)
constructor is removed. Use TxMarshaler.UnmarshalTransaction<T>()
method instead. [#2986]
PreEvaluationBlock<T>.Evaluate(PrivateKey, IAction?, Predicate<Currency>, IStateStore)
, PreEvaluationBlock<T>.DetermineStateRootHash(IAction?, Predicate<Currency>, IStateStore)
, PreEvaluationBlock<T>.DetermineStateRootHash(IAction?, Predicate<Currency>, IStateStore, out IImmutableDictionary<string, IValue>)
, PreEvaluationBlock<T>.DetermineStateRootHash(BlockChain<T>)
, and PreEvaluationBlock<T>.DetermineStateRootHash(BlockChain<T>, out IImmutableDictionary<string, IValue>)
. [#3037]
ApvCommand.Verify(string?, string[]?, bool)
method to ApvCommand.Verify(string?, PublicKey[]?, bool)
. [#3044]
PreEvaluationBlock<T>.Mine()
and BlockMetadata.MineNonce()
methods. [#3067]
HashCash
class. [#3067]
Account.publicKey
property with Account.getPublicKey()
async method. [#3061]
Account.getAddress()
async method. [#3084]
Address.deriveFrom()
method now returns Promise<Address>
when an Account
is given. However, it still returns Address
when a PublicKey
is given. [#3061]
Web3KeyStore
no more implements ImportableKeyStore<KeyId, RawPrivateKey>
. Instead, it now implements ImportableKeyStore<KeyId, Web3Account, Web3KeyMetadata>
. [#3061, #3084]
Index
field to IBlockChainContext
interface. [#2613]
BlockChain<T>.ProposeBlock(PrivateKey, DateTimeOffset, long, int, int, IComparer<Transaction<T>>, BlockCommit)
method. [#3072]
BlockChain<T>.ProposeBlock(PrivateKey, DateTimeOffset, BlockCommit, IComparer<Transaction<T>>)
method to BlockChain<T>.ProposeBlock(PrivateKey, BlockCommit, IComparer<Transaction<T>>)
. [#3077]
BlockChain<T>.ProposeGenesisBlock(IEnumerable<T>, IEnumerable<IAction>, PrivateKey, DateTimeOffset?, IAction, Predicate<Currency>)
to BlockChain<T>.ProposeGenesisBlock( PrivateKey, ImmutableList<Transaction<T>>, DateTimeOffset?, IAction, Predicate<Currency>)
. [#3079]
Currency.decimalPlaces
' type became Byte
from UInt
. [#3085]
currencyHash
parameter was removed from balance
and totalSupply
in StateQuery
type. [#3085]
ITxInvoice
interface. [#1164, #2986]
ITxSigningMetadata
interface. [#1164, #2986]
IUnsignedTx
interface. [#1164, #2986]
TxInvoice
class. [#1164, #2986]
TxSigningMetadata
class. [#1164, #2986]
UnsignedTx
class. [#1164, #2986]
Transaction<T>(IUnsignedTx, ImmutableArray<byte>)
. [#1164, #2986]
BlockChain<T>.DetermineGenesisStateRootHash()
, BlockChain<T>.EvaluateGenesis()
, BlockChain<T>.DetermineBlockStateRootHash()
, and BlockChain<T>.EvaluateBlock()
. [#3037]
PublicKey.FromHex()
static method. [#2709, #3044]
PublicKey.ToHex()
method. [#2709, #3044]
Gossip.PublishMessage()
method. [#3054, #3060]
Account.getPublicKey()
async method. [#3061]
Account.getAddress()
async method. [#3084]
RawPrivateKey.getPublicKey()
async method. [#3061]
RawPrivateKey.getAddress()
async method. [#3084]
AwsKmsAccount.getPublicKey()
async method. [#3061]
AwsKmsAccount.getAddress()
async method. [#3084]
Web3Account
class. [#3061, #3084]
Web3KeyObject
interface. [#3061]
IBlockChainIndex
interface.IIndexingContext
interface.BlockChainIndexBase
abstract class.RocksDbBlockChainIndex
class.RocksDbIndexingContext
class.IndexingService
class.IndexMismatchException
class.IndexCommand
Cocona command class.states
query in StateQuery
. [#3080]
Address.equals()
method. [#3071]
Address.isAddressOf()
method. [#3071]
PublicKey.equals()
method. [#3071]
DecryptionOptions
interface. [#3071]
Web3KeyStoreOptions.decryptionOptions
attribute.WeakPrivateKeyError
class. [#3071]
Web3KeyMetadata
interface. [#3084]
-v
/--validator-key
option to planet block generate-genesis
command. [#3088]
CurrencyInput
type. [#3085]
CurrencyInput
-typed currency
parameter to balance
and totalSupply
in StateQuery
type. [#3085]
Added TypeConverter
to commonly-used types. [#2711, #3044]
Address
now can be converted from and to string
through TypeConverter
.HashDigest<T>
now can be converted from and to string
through TypeConverter
.PublicKey
now can be converted from and to string
through TypeConverter
.Transaction<T>
no more supports deserialization from JSON when it contains custom actions. However, it still can be deserialized from JSON when it contains a system action. [#2986]
Transaction<T>.UpdatedAddresses
now preserves the order of Address
es so that it is no more reordered during deserialization. [#3074]
The JSON representation of Transaction<T>
now includes the "actions"
field, which includes a system action or a list of custom actions and a "type"
field denoting one of "system"
or "custom"
.
For example:
{
// ... other fields
"actions": {
"type": "system",
"systemAction": {
// system action details
}
}
}
Instead of:
{
// ... other fields
"systemAction": {
// system action details
}
}
(@planetarium/account-web3-secret-storage) Web3KeyStore.get()
method now defers PassphraseEntry.authenticate()
call and account unlocking so that AccountRetrieval
instance can be gathered without unlocking the account. Instead, PassphraseEntry.authenticate()
is called when operations that require unlocking Web3Account
are called, such as sign()
or getPublicKey()
. [#3061]
(Libplanet.Explorer) Now, when an IBlockChainIndex
instance is available in the optional Index
property of the injected IBlockChainContext
instance, GraphQL queries can benefit from the improved lookup performace of the index. Applications willing to take advantage of the index should provide an instance of IBlockChainIndex
to the IBlockChainContext
implementation and add the IndexingService
hosted service to sync the index in the background. Note that the synchronization may take a long time if you have a lot of blocks (over 24 hours for ~5M blocks). [#2613]
BlockRef
property of TransactionType
now uses IBlockChainIndex
if available.transactionResult
query in TransactionQuery
now uses IBlockChainIndex
if available.(@planetarium/account-web3-secret-storage) Web3KeyStore
now supports Scrypt as one of KDF functions besides PBKDF2. [#3071]
PreVote
block validation, Context<T>.IsValid()
, validate the block header and also the block content (e.g., Tx nonces, Policy defined validation rules, or state root hash.) [#2973, #2996]
Web3KeyStore.import()
and Web3KeyStore.generate()
methods had written JSON field "Crypto"
instead of "crypto"
in the key file. [#3071]
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Released on April 3, 2023.
Published by github-actions[bot] over 1 year ago
Released on March 31, 2023.
BlockChain<T>.Create()
is now get IBlockChainState
and ActionEvaluator
as parameters. [#3028]
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Released on March 28, 2023.
Initialize
system action. [#3010
Published by github-actions[bot] over 1 year ago
Released on March 27, 2023.
Since 0.53.0, we officially provide @planetarium/account-web3-secret-storage and @planetarium/account-aws-kms, which are npm packages that provides KeyStore
implementations that comply with @planetarium/account.
@planetarium/account-web3-secret-storage: An npm package for providing Web3KeyStore
which implements Ethereum Web3 Secret Storage (corresponds to Libplanet.KeyStore.Web3KeyStore
).
@planetarium/account-aws-kms: An npm package for providing AwsKmsKeyStore
which implements Account
and uses AWS KMS as the backend.
Since 0.53.0, we do not provide Libplanet.Node package anymore. If you still need the package, use 0.52.0 or its patched versions.
Due to changes in [#2961] and [#2970], a network ran with Libplanet 0.51.0 or Libplanet 0.52.0 is not compatible with this version. Thus, it is recommended to skip Libplanet 0.51.0 and Libplanet 0.52.0 for deployment if possible.
Libplanet.Node
namespace. [#2971]
StateCompleter
StateCompleters
TotalSupplyStateCompleter
TotalSupplyStateCompleters
ValidatorSetStateCompleter
ValidatorSetStateCompleters
T
for IAction
from ActionEvaluator
and IBlockChainStates
. [#2703]
Encodable
is replaced by Value
.
encodeBlockHash()
became Value
(was Encodable
).encodePublicKey()
became Value
(was Encodable
).encodeAddress()
became Key
(was Encodable
).encodeAddressSet()
became Value
(was Encodable
).encodeSignedTx()
became Dictionary
(was Map<string | Buffer, Encodable>
).encodeUnsignedTxWithSystemAction()
became Value
(was Encodable
).encodeUnsignedTxWithCustomActions()
became Value
(was Encodable
).CustomAction
type is now an alias of Value
(was an alias of Encodable
).encodeTxMetadata()
became Dictionary
(was Map<string | Buffer, Encodable>
).encodeSystemAction()
became Value
(was Encodable
).encodeCurrency()
became Value
(was Encodable
).encodeMint()
became Value
(was Encodable
).encodeTransfer()
became Value
(was Encodable
).Validator
and ValidatorSet
to implement IBencodable
. [#2954]
Validator(Dictionary)
to Validator(IValue)
and ValidatorSet(List)
to Validator(IValue)
.Validator.Encoded
to Validator.Bencoded
and ValidatorSet.Encoded
to ValidatorSet.Bencoded
.BlockCommit
to implement IBencodable
. [#2955]
BlockCommit(Dictionary)
to BlockCommit(IValue)
.BlockCommit.Encoded
to BlockCommit.Bencoded
.BlockHash
to implement IBencodable
. [#2959]
BlockHash(Binary)
to BlockHash(IValue)
.BlockHash.Bencoded
property.ITxMetadata
interface. [#2977]
Transaction<T>(ITxMetadata, IAction, byte[])
constructor became Transaction<T>(TxMetadata, IAction, byte[])
.Transaction<T>(ITxMetadata, IEnumerable<T>, byte[])
constructor became Transaction<T>(TxMetadata, IEnumerable<T>, byte[])
.TxMetadata(ITxMetadata)
constructor became TxMetadata(ITransaction)
.ITxExcerpt
interface. [#1997, #2977]
TxExcerptExtensions
static class. [#1997, #2977]
VoteMetadata
and Vote
to implement IBencodable
. [#2961]
VoteMetadata(Dictionary)
to VoteMetadata(IValue)
and Vote(Dictionary)
to Vote(IValue)
.VoteMetadata.Encoded
to VoteMetadata.Bencoded
and Vote.Encoded
to Vote.Bencoded
.byte
array related APIs from BlockCommit
, Vote
, VoteMetadata
. [#2970]
BlockCommit(byte[])
, BlockCommit.ByteArray
, and BlockCommit.ToByteArray()
.Vote(byte[])
, Vote.ByteArray
, and Vote.ToByteArray()
.VoteMetadata(byte[])
, VoteMetadata.ByteArray
, and VoteMetadata.ToByteArray()
.ActionEvaluator()
constructor now explicitly requires a new feeCalculator
parameter. [#2566]
BlockCommit
's IValue
encoding format. [#2961]
Block<T>
's IValue
encoding format. [#2970]
TransactionExtensions
static class. [#2977]
AccountDeletion
type.AccountGeneration
type.AccountImportation
type.AccountMetadata
type.AccountRetrieval
type.ImportableKeyStore
interface.KeyStore
interface.MutableKeyStore
interface.IFeeCalculator
interface. [#2566]
Signature.fromBytes()
and Signature.fromHex()
no more accept signatures with high S. Signatures with high S need to be normalized first so that they get rid of high S. [#2962]
Published by github-actions[bot] over 1 year ago
Released on March 28, 2023.
Initialize
system action. [#2976]
Published by github-actions[bot] over 1 year ago
Released on March 28, 2023.
Initialize
system action. [#2975]
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Released on March 17, 2023.
DealerSocket
cannot connect to peers because of IPv4 return of ResolveNetMQAddressAsync()
. [#2956]