NethermindEth / juno

Starknet client implementation.
https://juno.nethermind.io
Apache License 2.0
386 stars 169 forks source link

Investigate whether `SycnTransaction` and `BufferedTransaction` can be removed in favour of `db/pebble/transaction.go` #1782

Open IronGauntlets opened 6 months ago

IronGauntlets commented 6 months ago

Most likely there will only be one DB hence the SyncTransaction and BufferedTransaction abstractions may not be required. Instead, we should rely on the underlying DB implementation to provide the required functionality. Pebble already has a concept of Batch which is intended to batch multiple writes together before flushing to disk. The SyncTransaction explicitly uses a mutex to control the write and read operations, this should be ensured by the underlying db without further abstractions.