plugeth/cmd/utils
lightclient 1f50aa7631
cmd,internal/era: implement export-history subcommand (#26621)
* all: implement era format, add history importer/export

* internal/era/e2store: refactor e2store to provide ReadAt interface

* internal/era/e2store: export HeaderSize

* internal/era: refactor era to use ReadAt interface

* internal/era: elevate anonymous func to named

* cmd/utils: don't store entire era file in-memory during import / export

* internal/era: better abstraction between era and e2store

* cmd/era: properly close era files

* cmd/era: don't let defers stack

* cmd/geth: add description for import-history

* cmd/utils: better bytes buffer

* internal/era: error if accumulator has more records than max allowed

* internal/era: better doc comment

* internal/era/e2store: rm superfluous reader, rm superfluous testcases, add fuzzer

* internal/era: avoid some repetition

* internal/era: simplify clauses

* internal/era: unexport things

* internal/era,cmd/utils,cmd/era: change to iterator interface for reading era entries

* cmd/utils: better defer handling in history test

* internal/era,cmd: add number method to era iterator to get the current block number

* internal/era/e2store: avoid double allocation during write

* internal/era,cmd/utils: fix lint issues

* internal/era: add ReaderAt func so entry value can be read lazily

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>

* internal/era: improve iterator interface

* internal/era: fix rlp decode of header and correctly read total difficulty

* cmd/era: fix rebase errors

* cmd/era: clearer comments

* cmd,internal: fix comment typos

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2024-02-07 09:18:27 -07:00
..
cmd.go cmd,internal/era: implement export-history subcommand (#26621) 2024-02-07 09:18:27 -07:00
diskusage_openbsd.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
diskusage_windows.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
diskusage.go all: more linters (#24783) 2022-06-13 16:24:45 +02:00
export_test.go cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
flags_legacy.go all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
flags_test.go cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
flags.go cmd/utils: fix HTTPHost, WSHost flag priority (#28669) 2023-12-12 14:40:50 +01:00
history_test.go cmd,internal/era: implement export-history subcommand (#26621) 2024-02-07 09:18:27 -07:00
prompt_test.go cmd: run tests in parallel (#28546) 2023-11-20 10:52:14 +01:00
prompt.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00