-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Blob Syncer #1
Conversation
README.md
Outdated
./build/blob-syncer --config-type local --config-path config/config.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please draft a decent readme before the PR is fully ready.
swagger.yaml
Outdated
- http | ||
|
||
paths: | ||
/beacon/blob_sidecars/{blockNum}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Beacon Chain API spec, it is {block Id} here , not {block number}, these two are different meanings, can we make it 100% compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also according to
https://docs.prylabs.network/docs/how-prysm-works/prysm-public-api#restful-endpoints-grpc-transcoding, we should support GRPC as well.
syncer/blob_syncer.go
Outdated
forkedBlock := &db.Block{ | ||
Height: nextHeight, | ||
} | ||
return l.blobDao.SaveBlockAndBlob(forkedBlock, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we save such a block? I thought we dont save any data if it is a possible forked block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save it only to track the process block. As the slot number will not be reused in beacon chain.
} | ||
|
||
if isForkedBlock { | ||
return s.blobDao.SaveBlockAndBlob(&db.Block{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to save it if it is a forked block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when the syncer init a bundle, thhe bundle name will be binded with (startSlot, endSlot), the endSlot could be a forked block later. saving a forked block and treat it as a non-blobs included block will make the verifying process easier. as it need to query forked block from DB.
acd4524
to
1c7107b
Compare
The blob-syncer is the service sitting between Greenfield and Ethereum, constantly fetching blobs from Ethereum and persisting them into Greenfield storage for permanent archiving. The blob-syncer service also provides APIs for users to query historical blobs.