Elizaveta Chichindaeva
28908aa3cf
[ #2442 ] English Check
...
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Roman Khimov
9d2ef775cf
storage: simplify (*MemCachedStore).Put/Delete interface
...
They never return errors, so their interface should reflect that. This allows
to remove quite a lot of useless and never tested code.
Notice that Get still does return an error. It can be made not to do that, but
usually we need to differentiate between successful/unsuccessful accesses
anyway, so this doesn't help much.
2022-02-16 18:24:20 +03:00
Roman Khimov
86cb4ed80f
mpt: add the notion of MPT mode
...
It directly affects the storage format, so it's important. ModeGC is not used
at the moment, but defined for future extensibility.
2022-02-10 19:15:18 +03:00
Roman Khimov
2bc493a839
mpt: simplify makeStorageKey() interface
2022-02-08 12:38:03 +03:00
Anna Shaleva
43ac4e1517
rpc: implement findstates
RPC handler
2021-10-13 11:41:05 +03:00
Anna Shaleva
c8120a139d
core: add MaxKeyLength restrictions to MPT's operations
2021-10-06 16:37:23 +03:00
Evgeniy Stratonikov
db80ef28df
mpt: move empty hash node in a separate type
...
We use them quite frequently (consider children for a new branch
node) and it is better to get rid of unneeded allocations.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-08-06 12:01:16 +03:00
Roman Khimov
19717dd9a8
slice: introduce common Copy helper
...
It's a bit more convenient to use.
2021-07-19 22:57:55 +03:00
Evgenii Stratonikov
85f927d892
mpt: implement reference counting
...
Also postpone MPT initialization until `storeBlock`
because we need to read-and-check or save info about refcounting
depending on starting height.
2020-11-20 16:50:30 +03:00
Roman Khimov
e7d13e6db2
*: fix misspellings found in Go Report Card
2020-08-14 12:16:24 +03:00
Roman Khimov
475bf2445a
mpt: restructure nodes a bit, implement serialization and hash cache
...
It drastically reduces the number of allocations and hash calculations.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-30 12:42:15 +03:00
Evgenii Stratonikov
9b328240dd
mpt: implement MPT proof Get and Verify
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-30 12:42:15 +03:00