celestiaorg / rsmt2d

Go implementation of two dimensional Reed-Solomon merkle tree data availability scheme.
Apache License 2.0
162 stars 80 forks source link

EDS thread-safety #135

Open Wondertan opened 2 years ago

Wondertan commented 2 years ago

Right now, the EDS does not have any guarantees regarding thread safety for read and write operations. Users like celestia-node end up implementing custom synchronization solutions around EDS, while the best practice for Go is to have thread safety provided by the library.

The proposal is to add an additional SyncEDS wrapping the existing EDS structure extracted from the celestia-node. Alternatively, we can make the existing EDS synchronized by default.

Wondertan commented 2 years ago

It's clear that we want this, the only question is how: a separate structure or by extending the existing one. My vote would be for the extension.