backroll-rs icon indicating copy to clipboard operation
backroll-rs copied to clipboard

Bevy plugin does not create a checksum for the state anymore

Open james7132 opened this issue 4 years ago • 2 comments

As of 014fd15da35a74a3fed620f44d0f5bd68a506f48, bevy_backroll is now saving the provided state without any hashing/checksum. This could lead to silent desyncs as no checksum checks will fail in these cases. We should look for a generic way of handling this without reintroducing the Hash bound on Config::State.

james7132 avatar Jul 16 '21 00:07 james7132

A jank way we can do it is maybe giving all possible data a unique id? So like, hitbox transform is 25 or something. And then we add it all together for a checksum? That probably wouldn't work though...

ValorZard avatar Jul 16 '21 01:07 ValorZard

Just to bounce some more ideas around...

Perhaps we could introduce a BackrollChecksum trait, which is a weaker version of the Hash trait that is automatically implemented for objects that implement Hash, but allows us to extend it to generate checksums for common bevy data structures that are not covered by Hash.

ErnWong avatar Jul 16 '21 01:07 ErnWong