Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
release: 2.6.0 #3455
Prevents memory spikes during bootstrap phase by loading transactions of the same type in batches instead of all at once into memory during bootstrap.
The ajv address schema calls `Base58.decodeCheck` to validate the network byte. But during transaction serialization, the address is also decoded, so we end up doing it again. By performing the network byte validation during transaction serialization we can get rid of the decode call during schema validation. This makes multipayment processing approx. 25% faster.
findByAddress() is returning a reference to the stored wallet object, so modifying its balance property also modifies what is stored in the wallet manager, no need to re-insert it. This boosts the apply phase of the multi-payment bootstrap from ~9sec to ~6sec.
On mainnet database (9912558 blocks, 3171992 transactions): SELECT * FROM transactions WHERE type = 6; no index: 700ms, with index: 1ms SELECT * FROM transactions WHERE type = 1; no index: 650ms, with index: 14ms SELECT * FROM transactions WHERE type = 3; no index: 1280ms, with index: 480ms SELECT * FROM transactions WHERE type = 0; no index: 11500ms, with index: 11500ms (the index is not used) bootstrap no index: 22sec, with index: 20sec
Disable the TransactionReader because it inflicts a minor performance regression. However, do not completely delete it from the source code because we may revisit it later when the database queries start returning way too many rows to the nodejs app at once. The proper solution is to execute the database query once and serve the results to the app on portions using cursors, rather than executing the same query multiple times and chopping the portions using OFFSET,LIMIT.
* We support utf8 strings for vendor field * \u0000 (nul byte) is a valid utf8 string * PostgreSQL cannot store \u0000 in VARCHAR It follows that we cannot use VARCHAR for storing vendor field. So use bytea for that.
@@ Coverage Diff @@ ## master #3455 +/- ## ========================================= Coverage ? 66.16% ========================================= Files ? 439 Lines ? 12458 Branches ? 1708 ========================================= Hits ? 8243 Misses ? 4181 Partials ? 34