Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding history module and implementing inmemory block storage and mix… #205

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

godmodegalactus
Copy link
Collaborator

…ed storage

core/src/structures/produced_block.rs Show resolved Hide resolved
core/src/traits/block_storage_interface.rs Outdated Show resolved Hide resolved
history/src/block_stores/inmemory_block_store.rs Outdated Show resolved Hide resolved
history/src/block_stores/inmemory_block_store.rs Outdated Show resolved Hide resolved
pub struct MultipleStrategyBlockStorage {
inmemory_for_storage: InmemoryBlockStore, // for confirmed blocks
persistent_block_storage: BlockStorageImpl, // for persistent block storage
faithful_rpc_client: Option<Arc<RpcClient>>, // to fetch legacy blocks from faithful
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should go somewhere else.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah we want to fall back to faithful if the link is provided..

history/src/block_stores/multiple_strategy_block_store.rs Outdated Show resolved Hide resolved
.save(slot, block, commitment)
.await;
}
if slot > self.last_confirmed_slot.load(Ordering::Relaxed) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use compare_exchange

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compare exchange requires anyways to fetch the value and the value will be exchanged only if it is the same as current value which may add additional complexity.

history/src/block_stores/multiple_strategy_block_store.rs Outdated Show resolved Hide resolved
changes after groovies review
@godmodegalactus godmodegalactus force-pushed the implementing_history_for_blocks branch from 8c9cd82 to 7ef29e1 Compare September 21, 2023 13:39
@godmodegalactus godmodegalactus merged commit 147120c into main Sep 21, 2023
@godmodegalactus godmodegalactus deleted the implementing_history_for_blocks branch January 25, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants