-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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(gas_price_service_v1): block committer api format #2506
Changes from 17 commits
ae2b760
f01a94c
1ed6d98
5175631
a701116
13880ed
05574d5
519533d
6956ca3
a9e5067
a19b0b7
295e5e9
2c4cb2c
5744f3d
24637d7
c215b04
7a8e1b4
4655de6
eef1e9a
eb29a3a
fc107cc
38eebde
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,19 +93,16 @@ impl TableWithBlueprint for UnrecordedBlocksTable { | |
} | ||
} | ||
|
||
pub struct BundleIdTable; | ||
pub struct RecordedHeights; | ||
rafal-ch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/// The sequence number or bundle id of the posted blocks. | ||
type BundleId = u32; | ||
|
||
impl Mappable for BundleIdTable { | ||
impl Mappable for RecordedHeights { | ||
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. perhaps a comment here about using a fixed key vs different keys to store the last recorded block height? 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. I think I prefer this since we get to explicitly call for the height specified in the metadata. In the case that the metadata is behind the DB height, we can still get the right height. |
||
type Key = Self::OwnedKey; | ||
type OwnedKey = BlockHeight; | ||
type Value = Self::OwnedValue; | ||
type OwnedValue = BundleId; | ||
type OwnedValue = BlockHeight; | ||
} | ||
|
||
impl TableWithBlueprint for BundleIdTable { | ||
impl TableWithBlueprint for RecordedHeights { | ||
rafal-ch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type Blueprint = Plain<Primitive<4>, Postcard>; | ||
type Column = GasPriceColumn; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ pub mod service; | |
#[derive(Debug, Default, Clone, Eq, Hash, PartialEq)] | ||
pub struct DaBlockCosts { | ||
pub bundle_id: u32, | ||
// TODO: Should this be a range? | ||
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. Sounds like it should |
||
pub l2_blocks: Vec<u32>, | ||
pub bundle_size_bytes: u32, | ||
pub blob_cost_wei: u128, | ||
|
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 seems like we only insert to the DB. Should we consider pruning old data at some point?
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.
We only have one key now, so it's very small.