Conversation
Signed-off-by: muraca <mmuraca247@gmail.com>
…nesisBlockBuilder` Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
|
Quick recap of what happens:
|
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
|
@JoshOrndorff I think the |
tuxedo-template-runtime/src/lib.rs
Outdated
| // TODO: Initial Transactions for Kitties | ||
|
|
||
| // TODO: Initial UTXO for Existence | ||
| // TODO: Initial Transactions for Existence |
There was a problem hiding this comment.
Seems like a good time to resolve these. I think any example from any other piece would be sufficient. So maybe add a single PoE claim to genesis block, or a single amoeba creation to the genesis block.
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
|
I just found out there is some ongoing issue in Substrate about genesis block builder and genesis config and chain spec and how to do it after the native runtime is deprecated. |
I'd say let's conclude what we have going on now, and later adhere to the new native runtime free standards when everything is finished and well documented. |
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
I'm not sure executing them adds much value. This happens only at chain launch time, and I think that looking carefully at the genesis block (especially now that it explicitly contains all genesis state) is the duty of someone wanting to use the chain. Basically I'm arguing that the genesis block is like a summary of the prehistory and it's okay if the semantics are squishy or manually enforced for this one-time process to launch the chain. So IMO this resolves #107 fully. |
Signed-off-by: muraca <mmuraca247@gmail.com>
…uxedo#127 Signed-off-by: muraca <mmuraca247@gmail.com>
This PR introduces genesis transactions, which are neither validated nor executed.
They are stored in the genesis block, and their outputs are saved in storage as well.
Resolves #107 and blocks #128
Changelog:
std-gated functionInherentHooks::genesis_transactionsto generate genesis inherents.GenesisConfig's only parameter is now aVec<Transaction>.tuxedo-core/src/genesis.rswhich contains:TuxedoGenesisBlockBuilderbased on the one I implemented in GenesisBuilder with extrinsics execution #123, which reads the extrinsics list from storage keyEXTRINSICS_KEY, to include them in the genesis block.std-gated functionassimilate_storage, which:genesis_transactionslist after the keyEXTRINSICS_KEY;Transactions have no inputs or peeks;Outputs of thegenesis_transactionsare stored based on theTransactionthat created them.<TuxedoGenesisConfig as BuildStorage>::assimilate_storage:genesis_transactionslist appending atInherentHooks::genesis_transactionsitsTuxedoGenesisConfig.genesis_transactions, since the inherents should appear at the beginning of the block;genesis.rs/assimilate_storage;TuxedoGenesisBlockBuilderusing the traitBuildStorage.