Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
08ac08a
add dbmigrate cmd
JayT106 Oct 28, 2025
eadb759
extend migration to cover cometBFT db
JayT106 Oct 29, 2025
880faaa
add flushing of rocksdb to sst files when migrating to rocksdb
randy-cro Oct 30, 2025
aa547e5
add databases flag
JayT106 Oct 31, 2025
36dcbf7
extend db migrate with designated height
JayT106 Oct 31, 2025
47be3ba
update docs
JayT106 Oct 31, 2025
261e1b1
patch feature supports dryrun and key conflict actions
JayT106 Nov 3, 2025
6b4f5de
fix missing txhash patch in tx_index.db
JayT106 Nov 5, 2025
d8145d0
fix missing ethereumTX event key patch
JayT106 Nov 5, 2025
e61a6ed
fix patch ethereumTx event data and add tests
JayT106 Nov 8, 2025
ebadce3
fix rebase conflict
JayT106 Nov 12, 2025
0930026
lint-fix
JayT106 Nov 12, 2025
17df335
remove unneed script, refine code
JayT106 Nov 12, 2025
9d63f42
fix code by coderabbit review and remove memdb pebbledb support
JayT106 Nov 12, 2025
17e07d0
nit
JayT106 Nov 12, 2025
ac14b1e
fix error and nit
JayT106 Nov 12, 2025
8f468cb
fix rocksdb open issue
JayT106 Nov 12, 2025
f7e1e5c
fix coderabbit check
JayT106 Nov 12, 2025
a79b1a8
fix conflict
JayT106 Dec 2, 2025
364c348
fix code base on coderabbit review
JayT106 Nov 12, 2025
b7cf325
fix code base on coderabbit review
JayT106 Nov 12, 2025
f92ad03
lint
JayT106 Nov 12, 2025
55a154d
fix potential panic
JayT106 Nov 12, 2025
c9d4b88
fix CI errors
JayT106 Nov 12, 2025
851bf7b
fix code by coderabbit's suggestion
JayT106 Nov 12, 2025
490318b
fix cronos keeper iter not close
JayT106 Nov 12, 2025
4c9ed51
Apply golangci-lint formatting fixes
JayT106 Nov 12, 2025
e5511cd
Update cmd/cronosd/cmd/patch_db.go
JayT106 Nov 12, 2025
1ea7b81
fix potential missing patch keys
JayT106 Nov 13, 2025
1186664
remove unneed function
JayT106 Nov 13, 2025
a047c1a
fix iterator walk issue and remove height filter support logic in db …
JayT106 Nov 13, 2025
be32c45
missing file commit
JayT106 Nov 13, 2025
f648787
fix print error
JayT106 Nov 13, 2025
ab25fc8
fix by code review
JayT106 Nov 14, 2025
9804ab1
refine log
JayT106 Nov 14, 2025
2cf2131
refactor patchTxIndexData and update cmd description
JayT106 Nov 14, 2025
52e0832
revert linting changes unrelate to this PR
JayT106 Nov 14, 2025
4f649b4
revert iter fix unrelated to this PR
JayT106 Nov 14, 2025
6316445
fix readme errors
JayT106 Nov 14, 2025
00f9d08
update readme
JayT106 Nov 14, 2025
22924f3
fix README markdown
JayT106 Nov 14, 2025
57ed23a
constraint BackendType and DBType
JayT106 Nov 17, 2025
da80731
rebase migrate db
JayT106 Nov 17, 2025
9bcec8c
patchdb path validation
JayT106 Nov 17, 2025
ef6c026
fix-lint
JayT106 Nov 18, 2025
39a9d05
fix target path not checking
JayT106 Nov 18, 2025
668d3df
add enhanced tests
JayT106 Dec 2, 2025
fc1402d
remove duplicated changelog
JayT106 Dec 2, 2025
8e37e3a
fix suggestions from coderabbit
JayT106 Dec 2, 2025
291e2cc
fix doc
JayT106 Dec 2, 2025
750c6c7
Merge branch 'main' into jt/dbmigrate
JayT106 Dec 2, 2025
ccfb715
Merge branch 'main' into jt/dbmigrate
JayT106 Dec 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## UNRELEASED

* [#1908](https://github.com/crypto-org-chain/cronos/pull/1908) Add db migration/patch CLI tool
* [#1875](https://github.com/crypto-org-chain/cronos/pull/1875) Support for preinstalls
* [#1882](https://github.com/crypto-org-chain/cronos/pull/1882) Support for eip2935
* [#1880](https://github.com/crypto-org-chain/cronos/pull/1880) Move module from v2 to v1 to follow semver convention
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@ build: check-network print-ledger go.sum
install: check-network print-ledger go.sum
@go install -mod=readonly $(BUILD_FLAGS) ./cmd/cronosd

test: test-memiavl test-store
Comment thread
JayT106 marked this conversation as resolved.
test: test-memiavl test-store test-versiondb
@go test -tags=objstore -v -mod=readonly $(PACKAGES) -coverprofile=$(COVERAGE) -covermode=atomic

test-memiavl:
@cd memiavl; go test -tags=objstore -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic;
@cd memiavl && go test -tags=objstore -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic;

test-store:
@cd store; go test -tags=objstore -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic;
@cd store && go test -tags=objstore -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic;

test-versiondb:
@cd versiondb; go test -tags=objstore,rocksdb -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic;
@cd versiondb && go test -tags=objstore,rocksdb -v -mod=readonly ./... -coverprofile=$(COVERAGE) -covermode=atomic;

.PHONY: clean build install test test-memiavl test-store test-versiondb

Expand Down
29 changes: 29 additions & 0 deletions cmd/cronosd/cmd/database.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package cmd

import (
"github.com/spf13/cobra"
)

// DatabaseCmd returns the database command with subcommands
func DatabaseCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "database",
Short: "Database management commands",
Long: `Commands for managing Cronos databases.

Available subcommands:
migrate - Migrate databases between different backend types
Comment thread
thomas-nguy marked this conversation as resolved.
patch - Patch specific block heights into existing databases

Use "cronosd database [command] --help" for more information about a command.`,
Aliases: []string{"db"},
}

// Add subcommands
cmd.AddCommand(
MigrateCmd(),
PatchCmd(),
)

return cmd
}
Loading
Loading