-
Notifications
You must be signed in to change notification settings - Fork 212
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
Implement configurable requesting of packed chunks from peers #633
Conversation
@@ -267,3 +267,10 @@ sync_range({Start, End, Peer, TargetStoreID, RetryCount} = Args) -> | |||
end | |||
end | |||
end. | |||
|
|||
get_target_packing(StoreID) -> | |||
{ok, Config} = application:get_env(arweave, config), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good! I'd suggest loading the config once during init
and storing it in the #state. I'm not sure how significant an impact the get_env call will have (may be minor), but during heavy syncing we might expect this call to happen hundreds of times a second (and billions of times overall) so it may add up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual ar_storage_module:get_packing(StoreID)
is O(n) as it traverses the list. Is this will become a problem, this is potential candidate for optimization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The way to configure the distributed packing.
Miner node must have the following configuration options:
Packer node must have the following configuration options:
After starting the packer nodes with the option described above, reconfigure the miner node.
|
@JamesPiechota WIP version implemented