Skip to content

Commit

Permalink
Comments and cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfh committed Aug 13, 2024
1 parent 9ed7f79 commit a8da95a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
7 changes: 1 addition & 6 deletions nimbus/db/aristo/TODO.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
* Re-visit `delTree()`. Suggestion is deleting small trees on the memory later,
otherwise only deleting the root vertex (so it becomes inaccessible) and
remember the follow up vertices which can travel through the tx-layers
to be picked up by the backend store.

* Some comletions migh be needed for the `aristo_part` module which is a
* Some comletions might be needed for the `aristo_part` module which is a
re-implementation of the module supporting *proof-mode*/partial trees.
+ Complete `partMergeStorageData()`. This function might not be needed at
all unless *snap-sync* is really revived.
Expand Down
2 changes: 1 addition & 1 deletion nimbus/db/aristo/aristo_debug.nim
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ proc ppPayload(p: LeafPayload, db: AristoDbRef): string =
of AccountData:
result = "(" & p.account.ppAriAccount() & "," & p.stoID.ppVid & ")"
of StoData:
result = $p.stoData
result = ($p.stoData).squeeze

proc ppVtx(nd: VertexRef, db: AristoDbRef, rvid: RootedVertexID): string =
if not nd.isValid:
Expand Down
6 changes: 3 additions & 3 deletions nimbus/db/aristo/aristo_merge.nim
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ proc mergeGenericData*(

proc mergeStorageData*(
db: AristoDbRef; # Database, top layer
accPath: Hash256; # Needed for accounts payload
stoPath: Hash256; # Storage data path (aka key)
stoData: UInt256; # Storage data payload value
accPath: Hash256; # Needed for accounts payload
stoPath: Hash256; # Storage data path (aka key)
stoData: UInt256; # Storage data payload value
): Result[void,AristoError] =
## Store the `stoData` data argument on the storage area addressed by
## `(accPath,stoPath)` where `accPath` is the account key (into the MPT)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_coredb/coredb_test_xx.nim
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@ let
mainTest6r* = mainSampleEx
.cloneWith(
name = "-ex-ar-some",
numBlocks = 257_400,
numBlocks = 1_000_000,
dbType = AristoDbRocks,
dbName = "main-open") # for resuming on the same persistent DB

mainTest7r* = mainSampleEx
.cloneWith(
name = "-ex-ar-more",
numBlocks = 1_460_700, # failure at 1,460,736
numBlocks = 1_500_000,
dbType = AristoDbRocks,
dbName = "main-open") # for resuming on the same persistent DB

mainTest8r* = mainSampleEx
.cloneWith(
name = "-ex-ar-more2",
numBlocks = 1_460_735, # failure at 1,460,736
numBlocks = 2_000_000,
dbType = AristoDbRocks,
dbName = "main-open") # for resuming on the same persistent DB

Expand Down

0 comments on commit a8da95a

Please sign in to comment.