Skip to content

Processing Cross-Shard Transaction in a Block #17

@Salty-SourKey

Description

@Salty-SourKey

Problem

The current design has several points that do not implement the properties of a blockchain.

  • Independent cross-shard transactions processing
    Processing cross-shard transactions is independent of a state shard block. This prevents users from synchronizing the final state just by processing the state block history. Finalized cross-shard transactions should be included and processed in the state shard block for global serializability.

Proposal

Move the procedure of processing TpcResult to ProduceBlock that executes transactions

Step of processing TpcResult

  1. For a committed cross-shard transaction, append it to the state shard's transaction list using AddTx function.
  2. When executing transactions in ProduceBlock function, for cross-shard transactions, do the state transition.
  3. Commit state trie and get state root

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions