Collapse the various standalone functions for parsing block data, and
refactor consumers to initialize a Block with given data and access its
members as needed.
Closes: https://github.com/damus-io/damus/pull/1496
Signed-off-by: William Casarin <jb55@jb55.com>
This is a refactor of the codebase to use a more memory-efficient
representation of notes. It should also be much faster at decoding since
we're using a custom C json parser now.
Changelog-Changed: Improved memory usage and performance when processing events
This is a non-behavioral change in preparation for the actual switchover
from Strings to Ids. The purpose of this kit is to reduce the size of
the switchover commit which is going to be very large.
Since we can't mutate NdbNotes, let's update the existing codebase to
generate and sign ids on NostrEvent constructions. This will allow us to
match NdbNote's constructor
We eventually want to switch over to NdbNote instead of NostrEvent. To
facilitate this, the plan is to eventually make NostrEvent an alias of
NdbNote. For this to work, let's make sure the NostrEvent extensions are
implemented on NdbNote.
We will likely switch away from string properties as well, but for now
we will try to emulate as much as possible to make sure everything is
working first.