-
Notifications
You must be signed in to change notification settings - Fork 124
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
Store transactions in nanoBlocks
#136
Conversation
vm/resolutions.go
Outdated
@@ -182,6 +182,14 @@ func (vm *VM) processAcceptedBlocks() { | |||
vm.warpManager.GatherSignatures(context.TODO(), tx.ID(), result.WarpMessage.Bytes()) | |||
} | |||
|
|||
// Update chunk store | |||
for _, chunk := range b.FetchedChunks { | |||
if err := vm.StoreChunk(chunk); err != nil { |
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.
TODO: add chunk cache
return k | ||
} | ||
|
||
func (vm *VM) StoreChunk(chunk []byte) error { |
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.
TODO: add async clearing of chunks (store block heights)
vm/vm.go
Outdated
@@ -468,6 +478,7 @@ func (vm *VM) Shutdown(ctx context.Context) error { | |||
} | |||
|
|||
// Shutdown other async VM mechanisms | |||
vm.chunkManager.Done() |
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.
TODO: stop chunk manager last
Add metric for |
Don't re-trigger notify build until async done (disable timer) |
Simple example of fast and slow accept:
|
block.Chunks
nanoBlocks
* fix last computation in window * add genesis block to cache * nit * init seen data structures earlier * log proposer monitor refresh time * track mempool size * size-based gossip * make NetworkSizeLimit a const * add mode single * nits * port 159 * update DEVNET instructions * add prometheus cmd * update watch TPS * overhaul spam script * don't add potential block to check * check if should build more frequently * lint * add lll exemption * add helpful comment to window calc * fix spam cmd * lint * add more gossip controls * add gossip settings to scripts run * fix cluster shutdown * ensure client does not write concurrently to ws conn * fix flaky startup * avoid submitting duplicate txs * update with new HYPERSDK_VERSION
This PR has become stale because it has been open for 30 days with no activity. Adding the |
Resolves: #130
ParseBlock
,GetBlock
,BuildBlock
: https://github.com/ava-labs/avalanchego/blob/7d73b59cb4838d304387ea680b9cc4053b72620c/vms/rpcchainvm/vm_server.go#L457-L464throttler-outbound-at-large-alloc-size
andthrottler-inbound-at-large-alloc-size
Alternative: only generate root every X blocks