Open rymnc opened 1 week ago
In https://github.com/FuelLabs/fuel-core/pull/2142 we introduced benchmarks that were not too clean, and part of the rework has been addressed in -
The last part of the rework involves implementing TableWithBlueprint ~ https://github.com/FuelLabs/fuel-core/blob/f5240cb8baa8210c7b744a49d96695df0c84b2f1/crates/storage/src/structured_storage.rs#L74-L82
TableWithBlueprint
for the custom columns we have defined in the benchmarks ~ https://github.com/FuelLabs/fuel-core/blob/e09f9f10358a2ea40043eca1986b3f8a30291502/benches/src/db_lookup_times_utils/full_block_table.rs#L18-L25
so that we can use KeyValueInspect and KeyValueMutate storage traits ~ https://github.com/FuelLabs/fuel-core/blob/f5240cb8baa8210c7b744a49d96695df0c84b2f1/crates/storage/src/kv_store.rs#L49-L90 & https://github.com/FuelLabs/fuel-core/blob/f5240cb8baa8210c7b744a49d96695df0c84b2f1/crates/storage/src/kv_store.rs#L127-L167
KeyValueInspect
KeyValueMutate
to get/put data from the tables in batches without doing manual serde.
It is suggested to use Plain<Primitive<4>, Postcard> for the Blueprint associated type in the impls of TableWithBlueprint
Plain<Primitive<4>, Postcard>
And it would be nice to insert transactions and blocks by using InMemoryTransaction to speed up seeding=)
InMemoryTransaction
In https://github.com/FuelLabs/fuel-core/pull/2142 we introduced benchmarks that were not too clean, and part of the rework has been addressed in -
The last part of the rework involves implementing
TableWithBlueprint
~ https://github.com/FuelLabs/fuel-core/blob/f5240cb8baa8210c7b744a49d96695df0c84b2f1/crates/storage/src/structured_storage.rs#L74-L82for the custom columns we have defined in the benchmarks ~ https://github.com/FuelLabs/fuel-core/blob/e09f9f10358a2ea40043eca1986b3f8a30291502/benches/src/db_lookup_times_utils/full_block_table.rs#L18-L25
so that we can use
KeyValueInspect
andKeyValueMutate
storage traits ~ https://github.com/FuelLabs/fuel-core/blob/f5240cb8baa8210c7b744a49d96695df0c84b2f1/crates/storage/src/kv_store.rs#L49-L90 & https://github.com/FuelLabs/fuel-core/blob/f5240cb8baa8210c7b744a49d96695df0c84b2f1/crates/storage/src/kv_store.rs#L127-L167to get/put data from the tables in batches without doing manual serde.
It is suggested to use
Plain<Primitive<4>, Postcard>
for the Blueprint associated type in the impls ofTableWithBlueprint