Skip to content
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

fix: chainbuilder empty first block + use PebbleDB for block and state stores + cosmetics #4274

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b4f7f37
chore: chain builder cosmetics
rach-id Jan 23, 2025
5257eb2
chore: chain builder cosmetics
rach-id Jan 23, 2025
18e8a43
chore: try to parallelize
rach-id Jan 24, 2025
5ae985f
chore: remove cancells
rach-id Jan 24, 2025
c48ecbb
chore: reintroduce cancel
rach-id Jan 24, 2025
ffff0e9
chore: use other DBs
rach-id Jan 27, 2025
4ce4699
chore: use the synchronous version but with different databases
rach-id Jan 27, 2025
0f3c800
chore: use c level db
rach-id Jan 27, 2025
884f08b
chore: switch to badger db
rach-id Jan 27, 2025
163b1f0
chore: revert to pebble and golevel
rach-id Jan 27, 2025
11811d0
chore: use pebble db provider
rach-id Jan 27, 2025
123377b
chore: bump consts
rach-id Jan 27, 2025
89e3161
chore: add some prints
rach-id Jan 27, 2025
716beb2
chore: fill block with multiple txs
rach-id Jan 27, 2025
6980eb2
chore: decreate max gv square size
rach-id Jan 27, 2025
ac82da8
Revert "chore: fill block with multiple txs"
rach-id Jan 27, 2025
a7e2c66
chore: empty data
rach-id Jan 30, 2025
a4e9a02
chore: empty data
rach-id Jan 30, 2025
c4fce34
chore: prioritize checking done context
rach-id Jan 30, 2025
ee6e446
chore: prioritize checking done context
rach-id Jan 30, 2025
5e356f8
chore: revert unnecessary changes + cosmetics
rach-id Jan 31, 2025
c6404bb
chore: gofjmpt
rach-id Jan 31, 2025
0390605
chore:keep using the pebble store
rach-id Jan 31, 2025
ddc1a5a
chore: increase max tx size
rach-id Jan 31, 2025
8d60a49
chore: increase max tx size
rach-id Jan 31, 2025
7833fdd
chore: increase MaxBodyBytes
rach-id Jan 31, 2025
fcd7192
chore: increase MaxTxBytes
rach-id Jan 31, 2025
784a56d
chore: multiple blobs per square
rach-id Jan 31, 2025
1d814ca
chore: printing the number of blobs in block
rach-id Jan 31, 2025
5db7695
chore: increase send/receive rates
rach-id Jan 31, 2025
e5bb1d6
Revert "chore: printing the number of blobs in block"
rach-id Jan 31, 2025
0b8ad98
chore: avoid 0 case
rach-id Jan 31, 2025
b630ac3
chore: add some services config
rach-id Feb 11, 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
7 changes: 3 additions & 4 deletions tools/chainbuilder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Use `go` to run the binary as follows:
go run ./tools/chainbuilder
```

This will create a directory with the name `testnode-{chainID}`. All files will be populated and blocks generated based on specified input. You can run a validator on the file system afterwards by calling:
This will create a directory with the name `testnode-{chainID}`. All files will be populated and blocks generated based on specified input. You can run a validator on the file system afterward by calling:

```shell
celestia-appd start --home /path/to/testnode-{chainID}
Expand All @@ -19,9 +19,8 @@ celestia-appd start --home /path/to/testnode-{chainID}
The following are the set of options when generating a chain:

- `num-blocks` the number of blocks to be generated (default: 100)
- `block-size` the size of the blocks to be generated (default <2MB). This will be a single PFB transaction
- `square-size` the size of the max square (default: 128)
- `block-size` the size of the blocks to be generated in bytes (default <2MB). This will be a single PFB transaction
- `existing-dir` point this to a directory if you want to extend an existing chain rather than create a new one
- `namespace` allows you to pick a custom v0 namespace. By default "test" will be chosen.
- `namespace` allows you to pick a custom v0 namespace. By default, "test" will be chosen.

This tool takes roughly 60-70ms per 2MB block.
4 changes: 2 additions & 2 deletions tools/chainbuilder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ func Run(ctx context.Context, cfg BuilderConfig, dir string) error {
validatorKey := privval.LoadFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile())
validatorAddr := validatorKey.Key.Address

blockDB, err := dbm.NewDB("blockstore", dbm.GoLevelDBBackend, tmCfg.DBDir())
blockDB, err := dbm.NewDB("blockstore", dbm.PebbleDBBackend, tmCfg.DBDir())
if err != nil {
return fmt.Errorf("failed to create block database: %w", err)
}

blockStore := store.NewBlockStore(blockDB)

stateDB, err := dbm.NewDB("state", dbm.GoLevelDBBackend, tmCfg.DBDir())
stateDB, err := dbm.NewDB("state", dbm.PebbleDBBackend, tmCfg.DBDir())
if err != nil {
return fmt.Errorf("failed to create state database: %w", err)
}
Expand Down
Loading