Grant report for period 11.2019-1.2020 - Karol Skocik
On meetup in Prague, a decision was made to implement a garbage
collector, which would trim the history of account movements and limit
the amount of data each user has to keep on disk.
Various approaches how to implement a garbage collector were tried,
and a version of 1-phase collector was documented in a GC research
Work on querying of a registered name in naming system using a hash
was finalized and merged.
Our Sophia contract language was improved by introducing of
AENS.update function, which allows changing properties of a name and
updating of name pointers from contracts.
This fixed the feature parity gap we had in package covering naming
There was also checking of the viability of Lumen
(https://github.com/lumen/lumen) to bring Sophia compiler and parts of
the node to mobile and browser. While this approach shows a great
promise, Lumen needs to merge compiler branch to the main branch
before it can be useful for building deliverables running on other
After assessing the features of 1-phase garbage collector and
discussion on Sofia meetup, we decided to implement a 2-phase
collector. While this version performs slower, it brings more
confidence regarding the stability of the node and preservation of all
Work on 2-phase collector was interrupted by middleware takeover
written in Rust. The middleware powers sites like aeternal.io and is
used by surrounding ecosystem (like airgap).
After middleware takeover, I picked up on remaining work on 2-phase
garbage collector - especially testing and stabilization of the
running garbage collector over longer period of time (4 days). The aim
was to gain confidence that running garbage collector in a loop
doesn’t case any node unstability and is ready for merging with the
rest of node codebase.
Below is a summary of this testing:
Running from 27.1.2020 - 31.1.2020
Number of garbage collections: 562
Number of generations to keep: 500
Average time of main scanning phase: 98.1 seconds
Average time of writing nodes from cache to disk: 4.5 seconds
Average time of swapping account nodes: 17.65 seconds
Number of hash_not_present_in_db errors: 3
Stability issues (node crashes): 0