Commit Graph

241 Commits

Author SHA1 Message Date
Richard Patel 5d7f351484 replay: mainnet epoch 0 PoH 🏁
- Implements transaction mixin
- Replays fine for a few thousand slots so far
2022-10-19 01:44:30 +00:00
Richard Patel 7b97065d5a go.mod: pin solana-go to fork with vote decoding 2022-10-19 01:41:52 +00:00
Richard Patel 53bbce1304 add merkletree package
Ports the construction algorithm of solana-merkle-tree.
2022-10-18 23:23:09 +00:00
Richard Patel 14594ded1b
replay: mainnet block 0 🏁 2022-10-18 16:48:39 -05:00
Richard Patel 0eeb85b874 add runtime package 2022-10-16 04:10:12 +00:00
Richard Patel 8278a5dc00
cargen: open as O_RDWR
Copying files between CARs needs read/write-file mode.
Embarrassing bug. Adding unit tests next time.
2022-09-28 23:01:56 +02:00
Richard Patel f9acf4f518
cargen: fix cache bug while splitting CARs
When splitHandle moves data from old to new CAR,
it fails to flush the write cache of the old car,
and seeks past the end of the file.

Regression introduced by a319031b
2022-09-26 16:44:19 +02:00
Leo 28a1e298f0 README.md: well, technically 2022-09-26 14:10:36 +02:00
Leo 55c6b113af Make rocksdb optional and document build 2022-09-26 14:07:11 +02:00
Leo 0d5dd26722 radiance: optional build tag for rocksdb commands
Compiling the rocksdb binding isn't as straight-forward
as installing rocksdb headers:

$ go build ./...
# github.com/linxGnu/grocksdb
../../go/pkg/mod/github.com/linx!gnu/grocksdb@v1.7.7/cache.go:84:2: could not determine kind of name for C.rocksdb_lru_cache_options_set_num_shard_bits

Adding an optional build tag to compile radiance with rocksdb
support, otherwise remove the blockstore command. This keeps
everything else working with CGO_ENABLED=0.
2022-09-26 13:29:59 +02:00
Leo a7ce08b6fe Unfork quic-go and update it for Go 1.19 compat
Solana is now properly doing ALPN, so we no longer need the fork.
2022-09-26 13:27:23 +02:00
Leo 7fefc225f6 proto: check in generated code
Add the protos as well to make them "go get"-able
by downstream projects.
2022-09-26 13:10:56 +02:00
Linus Kendall 8a86188bb0
Radiance requires golang 1.9 (#39)
Uses atomic types introduced in 1.9.
2022-09-26 13:05:05 +02:00
Richard Patel df79377116
README: document radiance tool 2022-09-26 00:54:45 +02:00
Richard Patel a319031bd8
cargen: use buffered writer (+120% perf) 2022-09-26 00:41:26 +02:00
Richard Patel 480c66c744
cmd/car: add profiling support 2022-09-26 00:32:04 +02:00
Richard Patel bb94b7e6c0
blockstore: let BlockWalk iterate over rooted slots only 2022-09-25 15:43:57 +02:00
Richard Patel c9db39178f
add .car and RocksDB to gitignore 2022-09-25 15:35:04 +02:00
Richard Patel 2d8b42f33a
cargen: improve godoc 2022-09-25 15:35:04 +02:00
Richard Patel 473624867a
cargen: implement CAR file splitting 2022-09-25 15:35:03 +02:00
Richard Patel 5fb1dfa576
car: refactor into cargen 2022-09-25 15:35:03 +02:00
Richard Patel dd176b872c
car: write blocks, not just transactions 2022-09-25 15:35:03 +02:00
Richard Patel 6b5feeba9a
ipldgen: add IPLD ledger stream generator 2022-09-25 15:35:03 +02:00
Richard Patel 6ce807bb2e
generate.sh: run ipld gengo 2022-09-25 14:25:25 +02:00
Richard Patel d3b2c3e9a5
ipldsch: add ledger IPLD schema 2022-09-25 14:25:03 +02:00
Richard Patel 2aaf87d454
cmd/blockstore: add yaml --roots flag 2022-09-24 18:40:08 +02:00
Richard Patel 34df1a0fd7
car: write transaction blocks 2022-09-24 17:40:57 +02:00
Richard Patel 119cef0fd1 car: add CARv1 writer 2022-09-24 15:01:17 +00:00
Richard Patel 7aea7df6fd car: allow multiplexer to seek to a slot 2022-09-24 13:43:54 +00:00
Richard Patel 31e05eec91 cmd/car: add blockstore multiplexer
Adds iterator that fuses multiple blockstores into a contiguous chain.
2022-09-23 21:04:19 +00:00
Richard Patel b396aea76a remove Dependabot
Moving to Gerrit, which is compatible with Dependabot.

Change-Id: Ieb1e782d9f9aebfad03f9763687eafa686126e82
Reviewed-on: https://git.firedancer.io/c/radiance/+/145
2022-09-22 21:52:51 +00:00
Richard Patel 758ede5690 Move Go module to go.firedancer.io/radiance
Change-Id: I76845d19e864d6c7cd0fff77dbe63fc722bbf808
Reviewed-on: https://git.firedancer.io/c/radiance/+/131
2022-09-21 23:40:06 +00:00
Leo 8bbc0f1a75 Remove Git LFS 2022-09-19 16:21:37 +02:00
gagliardetto f6a9e60f31
shred: improve DataShredsToEntries performance
* Don't use reflection for shred decoding
* Add shred decoding benchmark
2022-09-19 13:46:29 +02:00
dependabot[bot] 869f92e798 build(deps): bump github.com/klauspost/compress from 1.15.9 to 1.15.10
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.15.9 to 1.15.10.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.15.9...v1.15.10)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 12:34:27 +02:00
Richard Patel 8db4cbffeb
go mod tidy 2022-09-18 17:07:12 +02:00
Richard Patel 41b9449a99
verify-data: decrease log verbosity of skipped slots 2022-09-18 01:55:51 +02:00
Richard Patel bb6d4ce6f6
shred: skip empty shreds
Encountered in mainnet slot 102763321 data shred index 484
2022-09-18 01:49:01 +02:00
Richard Patel 13bbff84f3
cmd/blockstore/verify-data: add rate gauges 2022-09-18 01:39:02 +02:00
Richard Patel 907e65fb6c fixtures: make shred sort order natural
Sorry for the `git pull` jumpscare!
2022-09-18 01:21:42 +02:00
Richard Patel 0f7098a795 shred: support recent legacy shred
Some time along Solana mainnet-beta history,
the legacy data shred header was extended
from 86 bytes to 88 bytes.

We don't know when exactly this change has happened.
Or whether the shred version is self-describing.

For now, add a simple switch by slot number.
2022-09-18 01:21:42 +02:00
Richard Patel dfd7be865c
cmd/blockstore/verify-data: add --dump-sigs flag
Add flag to print sigs for scientific purposes
2022-09-17 23:36:42 +02:00
dependabot[bot] b2c06c4509 build(deps): bump github.com/twmb/franz-go from 1.6.0 to 1.7.1
Bumps [github.com/twmb/franz-go](https://github.com/twmb/franz-go) from 1.6.0 to 1.7.1.
- [Release notes](https://github.com/twmb/franz-go/releases)
- [Changelog](https://github.com/twmb/franz-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/twmb/franz-go/compare/v1.6.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/twmb/franz-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-17 22:40:03 +02:00
dependabot[bot] 85a3cdde16 build(deps): bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.4.0
Bumps [github.com/coreos/go-systemd/v22](https://github.com/coreos/go-systemd) from 22.3.2 to 22.4.0.
- [Release notes](https://github.com/coreos/go-systemd/releases)
- [Commits](https://github.com/coreos/go-systemd/compare/v22.3.2...v22.4.0)

---
updated-dependencies:
- dependency-name: github.com/coreos/go-systemd/v22
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-17 22:39:48 +02:00
Richard Patel 0585231e9f
blockstore: add genesis deshred test 2022-09-17 20:42:34 +02:00
Richard Patel 64f4cbec93
cmd/blockstore/verify-data: log txn and byte count 2022-09-17 20:26:16 +02:00
Richard Patel 7eae6ce5ad
cmd/blockstore/verify-data: fix result output in tty mode
Fixes bug where results don't get printed
after progress bar finishes
2022-09-17 20:15:07 +02:00
Richard Patel 3405d76a1a
cmd/blockstore/verify-data: add progress bar, bug fixes
Adds fancy progress bar :3

Fixes deadlock bug
Fixes bug where workers read past their task end
2022-09-17 20:11:00 +02:00
Richard Patel 493c87d0da
cmd/blockstore: fix minor RocksDB iterator leak
Closes iterators after finishing.
Doesn't matter anyways because app exit drops the entire DB handle.
2022-09-17 18:54:48 +02:00
Richard Patel 047585136b
cmd/blockstore: add verify-data tool
Adds tool that scans over the ledger entries in a blockstore.
2022-09-17 18:51:24 +02:00