hedera-services icon indicating copy to clipboard operation
hedera-services copied to clipboard

Event Refactor

Open edward-swirldslabs opened this issue 1 year ago • 0 comments

Notes:

  • the target event structure is documented here
  • events cross upgrade boundaries, so while making changes we will need to be able to deserialize previous version events as well as being able to serialize them to the exact same bytes (this is needed to validate the hash of the event)
  • a good way to manage this migration is to have separate fields for protobuf objects
  • once the refactor is done, a SelfSerializable will wrap a protobuf event to support migration. once the migration is complete, we can remove that wrapper
  • as far as we know, no one is consuming the consensus event stream, so making changes to it is not a problem
  • due to current challenges, all protobuf definitions will be in the same module, platform and services

End goals:

  • [ ] Apps consume all required protobuf records (payloads, core data, signature)
  • [ ] Gossip (& PCES) protobuf events
  • [ ] Double hash payloads when hashing an event
  • [ ] Cleanup internal event structure
### Discussion and planning
- [ ] https://github.com/hashgraph/hedera-services/issues/11387
- [ ] https://github.com/hashgraph/hedera-services/issues/11384
- [ ] https://github.com/hashgraph/hedera-services/issues/11383
- [ ] https://github.com/hashgraph/hedera-services/issues/11386
- [ ] https://github.com/hashgraph/hedera-services/issues/11388
- [x] Finalize protobuf plan
- [ ] What about the post-consensus info like round number, judges and so on
### Preparation
- [ ] https://github.com/hashgraph/hedera-services/issues/11389
- [ ] https://github.com/hashgraph/hedera-services/issues/11764
- [ ] https://github.com/hashgraph/hedera-services/issues/11864
- [ ] https://github.com/hashgraph/hedera-services/issues/11862
- [ ] https://github.com/hashgraph/hedera-services/issues/12021
- [ ] Create JHM test with double hashing of payloads
### Transaction
- [ ] https://github.com/hashgraph/hedera-services/issues/12210
- [ ] https://github.com/hashgraph/hedera-services/issues/12214
- [ ] https://github.com/hashgraph/hedera-services/issues/12331
- [ ] https://github.com/hashgraph/hedera-services/issues/12589
- [ ] https://github.com/hashgraph/hedera-services/issues/12292
- [ ] https://github.com/hashgraph/hedera-services/issues/12420
- [ ] https://github.com/hashgraph/hedera-services/issues/12551
- [ ] https://github.com/hashgraph/hedera-services/issues/12847
- [ ] https://github.com/hashgraph/hedera-services/issues/12850
- [ ] https://github.com/hashgraph/hedera-services/issues/12885
### Event
- [ ] https://github.com/hashgraph/hedera-services/issues/12473
- [ ] https://github.com/hashgraph/hedera-services/issues/12947
- [ ] https://github.com/hashgraph/hedera-services/issues/12982
- [ ] https://github.com/hashgraph/hedera-services/issues/12996
- [ ] https://github.com/hashgraph/hedera-services/issues/13172
- [ ] CES should consume consensus rounds
- [ ] All apps should switch to semantic version, preferably the protobuf generated one
- [ ] Put PBJ consensus data into GossipEvent
- [ ] Put `GossipEvent` inside `ConsensusRound` instead of `EventImpl`
- [ ] Decuople event hashing from serialization
- [ ] Decouple CES serialization from event structure
- [ ] EventImpl should be exposed to only consensus and GUI
- [ ] Migrate PCES to protobuf
- [ ] https://github.com/hashgraph/hedera-services/issues/13015
- [ ] https://github.com/hashgraph/hedera-services/issues/13139
- [ ] https://github.com/hashgraph/hedera-services/issues/13000
- [ ] https://github.com/hashgraph/hedera-services/issues/12456
- [ ] https://github.com/hashgraph/hedera-services/issues/13138
### Misc tasks
- [ ] #5224
- [ ] #11300
- [x] Delete `UnhashedEventData`
- [ ] https://github.com/hashgraph/hedera-services/issues/10978
- [ ] https://github.com/hashgraph/hedera-services/issues/12464
- [ ] https://github.com/hashgraph/hedera-services/issues/12898
- [ ] https://github.com/hashgraph/hedera-services/issues/12959

edward-swirldslabs avatar Oct 25 '23 14:10 edward-swirldslabs