-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(accountsdb): Generate snapshots, fix UAF, improve bincode #179
Merged
Commits on Jul 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 65639e8 - Browse repository at this point
Copy the full SHA 65639e8View commit details -
Make use of less brittle stdlib type check
The string returned by `@typeName` has no guaranteed nor reliable format, and is not technically guaranteed to be unique to all types. Using these specific helpers to identify arraylists and hashmaps is less brittle.
Configuration menu - View commit details
-
Copy full SHA for a7b6c68 - Browse repository at this point
Copy the full SHA a7b6c68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 413e54b - Browse repository at this point
Copy the full SHA 413e54bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 132fc05 - Browse repository at this point
Copy the full SHA 132fc05View commit details -
Configuration menu - View commit details
-
Copy full SHA for be8279c - Browse repository at this point
Copy the full SHA be8279cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 272fb7c - Browse repository at this point
Copy the full SHA 272fb7cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83e3955 - Browse repository at this point
Copy the full SHA 83e3955View commit details -
Stop using
@typeName
inbincode.free
as wellalso make it support unmanaged data structures properly
Configuration menu - View commit details
-
Copy full SHA for ee2271a - Browse repository at this point
Copy the full SHA ee2271aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ed2cf7 - Browse repository at this point
Copy the full SHA 9ed2cf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6242997 - Browse repository at this point
Copy the full SHA 6242997View commit details -
Remove consequently unused `enumFromName` utility function & amend some imports in the process.
Configuration menu - View commit details
-
Copy full SHA for b02a387 - Browse repository at this point
Copy the full SHA b02a387View commit details -
Configuration menu - View commit details
-
Copy full SHA for 032b0b5 - Browse repository at this point
Copy the full SHA 032b0b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b3046be - Browse repository at this point
Copy the full SHA b3046beView commit details -
Some bincode additions & improvements
* add `arraylist.defaultArrayListUnmanagedOnEOFConfig` * Handle hashmap size overflow * Free hashmap key value pair on error * Error on duplicate hash map entries * Add `skip_write_fn` config predicate: kind of a duct-tape solution, but it'll serve us while we use this bincode model.
Configuration menu - View commit details
-
Copy full SHA for 84a0d9d - Browse repository at this point
Copy the full SHA 84a0d9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27f2b7a - Browse repository at this point
Copy the full SHA 27f2b7aView commit details -
Implement
writeSnapshotTarTo
method, & moreThis commit brings an initial high level implementation for the generation of snapshots based off of currently derivable data in accountsdb. It also makes a number of changes to accommodate testing, and improve code robustness, namely a switch from byte slice paths to directory handles in related & auxiliary code. Also this specifically modifies loadAndVerifyAccountsFiles to take the task indexes in order to slice into the file map data, instead of the file name list. Another notable change is the fixup for the `largest_root_slot` field not actually being assigned the largest available root slot. There are also various other improvements and refactors.
Configuration menu - View commit details
-
Copy full SHA for 7096c0f - Browse repository at this point
Copy the full SHA 7096c0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c3f0a8 - Browse repository at this point
Copy the full SHA 0c3f0a8View commit details -
bincode improvements & hashmap config
* Make the deserialize allocator parameter non-optional * Move the free function after the write function * Add the optional & list namespaces * Add `readIntAsLength` * Remove `getSerializedSize` * Don't return error.EOF instead of error.EndOfStream * Reorganize struct type reading and writing * Make `write` use the type detection instead of `@typeName` * Add dedicated hash map config
Configuration menu - View commit details
-
Copy full SHA for deaa226 - Browse repository at this point
Copy the full SHA deaa226View commit details -
Various accountsdb improvements & fixes
* Pass fields directly instead of passing whole structs * Store a only a single AccountFileInfo per hashmap entry, whilst serializing and deserializing it as a slice. * Fix copy paste error: @"!bincode-config:incremental_snapshot_persistence" @"!bincode-config:snapshot_persistence"
Configuration menu - View commit details
-
Copy full SHA for 60ad87e - Browse repository at this point
Copy the full SHA 60ad87eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 597ce20 - Browse repository at this point
Copy the full SHA 597ce20View commit details -
Configuration menu - View commit details
-
Copy full SHA for c984ff9 - Browse repository at this point
Copy the full SHA c984ff9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bc6b6f - Browse repository at this point
Copy the full SHA 0bc6b6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b2f8c7 - Browse repository at this point
Copy the full SHA 0b2f8c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 972e0f4 - Browse repository at this point
Copy the full SHA 972e0f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9644cd - Browse repository at this point
Copy the full SHA e9644cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ccce17 - Browse repository at this point
Copy the full SHA 6ccce17View commit details -
Rename & assign count value to local variable
* Renames `fields_file_map` to `file_info_map` * Assign `file_info_map.count()` to `n_account_files`
Configuration menu - View commit details
-
Copy full SHA for 519bad0 - Browse repository at this point
Copy the full SHA 519bad0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6db142d - Browse repository at this point
Copy the full SHA 6db142dView commit details -
* Import `sig.utils.types.arrayListInfo`. * Clarify control flow. * Get rid of `MaybeHashMapConfig`. * Document the `skip_write_fn` predicate.
Configuration menu - View commit details
-
Copy full SHA for e0392ce - Browse repository at this point
Copy the full SHA e0392ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3230959 - Browse repository at this point
Copy the full SHA 3230959View commit details -
Configuration menu - View commit details
-
Copy full SHA for c71539c - Browse repository at this point
Copy the full SHA c71539cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9f5c2b - Browse repository at this point
Copy the full SHA f9f5c2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a097c7 - Browse repository at this point
Copy the full SHA 8a097c7View commit details -
Improve file_map iteration & use more
FileId
* Iterate over `file_info_map` instead of `file_map`, locking only account files which are definitely going to be written based on the former. * Concretize the fact that we're only properly supporting full snapshot generation at the moment, incremental snapshot generation is future work. * Replace various instances of `id: usize` with `id: FileId` and amend related usage sites. In `AccountFileInfo`, this is also amended to override the bincode field config to serialize and deserialize it as a `usize`.
Configuration menu - View commit details
-
Copy full SHA for e294dce - Browse repository at this point
Copy the full SHA e294dceView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab93e50 - Browse repository at this point
Copy the full SHA ab93e50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08572b9 - Browse repository at this point
Copy the full SHA 08572b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 551eab3 - Browse repository at this point
Copy the full SHA 551eab3View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.