aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

BlockSynchronizationView/Event & simple barrier (block metadata txn)

Open gelash opened this issue 5 months ago • 2 comments

This should be an improvement over the current state of affairs, as finishing of block metadata txn would trigger everything that has done a read already (timestamp, randomness) to re-execute. With this change, workers will wait to start, which the blockmetadata transaction will allow after it finishes. saves wasted concurrent work and invalidation, but to discuss:

  • should we do a condvar so workers are not busy waiting?
  • should we pre-populate/hint the entries (timestamp, randomness), and allow the transactions to start earlier? Should be consistent with this design too though as we could just move the signal_can_start on write barrier earlier (but maybe we want to do this differently?)

Type of Change

  • [x] New feature
  • [ ] Bug fix
  • [ ] Breaking change
  • [x] Performance improvement
  • [x] Refactoring
  • [ ] Dependency update
  • [ ] Documentation update
  • [x] Tests

Which Components or Systems Does This Change Impact?

  • [x] Validator Node
  • [ ] Full Node (API, Indexer, etc.)
  • [ ] Move/Aptos Virtual Machine
  • [ ] Aptos Framework
  • [ ] Aptos CLI/SDK
  • [ ] Developer Infrastructure
  • [ ] Other (specify)

How Has This Been Tested?

Testing two types of barriers in proptests

gelash avatar Aug 27 '24 22:08 gelash