-
Notifications
You must be signed in to change notification settings - Fork 527
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
Delegation backend: new storage structure #9712
Delegation backend: new storage structure #9712
Conversation
ed1d9bf
to
9f0993d
Compare
9f0993d
to
b5e2326
Compare
5325131
to
23ddde4
Compare
a85f884
to
a194967
Compare
df34a13
to
a194967
Compare
a194967
to
ceb1421
Compare
2ec96ce
to
3ea6f55
Compare
* Store files at new paths * Implement a migration tool
Encode public key in correct way
Problem: migration tool is slow. Solution: try to improve the speed by allowing up to 100 concurrent migrations.
Problem: blocks are being overwritten again and again. This puts a substantial burden upon backend. Solution: do not overwrite existing objects on the bucket. In case of a block, that would result into block being uploaded only once.
3ea6f55
to
9b806a3
Compare
|
||
const NETWORK_ID = 1 // mainnet | ||
const PK_LENGTH = 33 // one field element (32B) + 1 bit (encoded as full byte) | ||
const SIG_LENGTH = 64 // one field element (32B) and one scalar (32B) | ||
|
||
// we use state hash code here, although it's not state hash |
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.
Can we use a different code here? The idea behind having separate ones was so that they were easy to distinguish / hard to confuse.
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.
It's complicated: it would require another round of data migration and some more action on Ontab's side. We might do it if we'll be doing such a pass for other reasons in future though.
Upon request from OnTab, a few changes were introduced to Delegation backend. A different directory structure was agreed upon to ease implementation of Ontab's software.
Explain your changes:
<submited_date>/<submitted_time>-<submitter>.json
created_at
,submitter
andblock_hash
are added to the JSON filesubmitter
field is fixed to match Mina's standard Pk encoding (prefix was added)Explain how you tested your changes:
Checklist: