-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
libp2p.dialProtocol promises are retained in memory #2181
Comments
In regards to the finalizedRoot: When accessing a property of the state, a new SubTree is created which holds a reference to the parent tree (the entire state). For example here:
ssz getter code: https://github.com/ChainSafe/ssz/blob/d6efe104a3bdc2d2beebc47af8234a3e40d414f4/src/backings/tree/container.ts#L142 getProperty<V extends keyof T>(target: Tree, property: V): PropOfTreeBacked<T, V> {
...
return fieldType.tree.asTreeBacked(this.getSubtreeAtChunk(target, chunkIndex)) as PropOfTreeBacked<T, V>;
} persistent-merkle-tree code: getSubtree(index: Gindex): Tree {
return new Tree(this.getNode(index), (v: Tree): void => this.setNode(index, v.rootNode));
} So if someone grabs
|
Proposed solution ChainSafe/ssz#83 (comment) |
This seems to be fixed completely with ChainSafe/persistent-merkle-tree#26 |
Describe the bug
This is from a heap snapshot I use to sync Pyrmont
Expected behavior
finalizeRoot
should not carry the Tree objectSteps to Reproduce
The text was updated successfully, but these errors were encountered: