-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add storage commitments to blobs #304
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
4755f4b
b9f09bc
eb788d3
6e97385
e44b5c0
ec489d5
8213b8c
f815f62
4fa33cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,31 @@ use serde::{Deserialize, Serialize}; | |
|
|
||
| use crate::state::{BlobStatus, Hash, PublicKey}; | ||
|
|
||
| /// Params to get storage staked per validator. | ||
| #[derive(Clone, Debug, Serialize, Deserialize)] | ||
| #[serde(transparent)] | ||
| pub struct GetStorageStakedParams(pub Address); | ||
|
|
||
| #[derive(Clone, Debug, Serialize_tuple, Deserialize_tuple)] | ||
| pub struct StorageStakedReturn { | ||
| pub address: Address, | ||
| pub storage: u64, | ||
| } | ||
|
|
||
| /// Params to increase storage staked per validator. | ||
| #[derive(Clone, Debug, Serialize_tuple, Deserialize_tuple)] | ||
| pub struct StakeStorageParams { | ||
| pub address: Address, | ||
| pub storage: u64, | ||
| } | ||
|
|
||
| /// Params to decrease storage staked per validator. | ||
| #[derive(Clone, Debug, Serialize_tuple, Deserialize_tuple)] | ||
| pub struct UnstakeStorageParams { | ||
| pub address: Address, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do we need the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fair concern. It is not clear who the origin or the caller can be though considering the call could be originated from an ETH contract. It is similar to how credits work IMO:
|
||
| pub storage: u64, | ||
| } | ||
|
|
||
| /// Params for buying credits. | ||
| #[derive(Clone, Debug, Serialize, Deserialize)] | ||
| #[serde(transparent)] | ||
|
|
||
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.
I don't have a strong opinion here, but I think in our earlier discussions, we were going to call this "commitments" versus "staking" which technically happens elsewhere? So that would make this one (for example)
GetStorageCommitment..?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.
Fair enough. Changed it to "commitment" and friends for uniformity.