Skip to content

feat(sequencer): add allowed_fee_asset_ids abci query and sequencer_client support#1127

Merged
itamarreif merged 18 commits intomainfrom
itamarreif/sequencer-allowed-fee-assets
Jun 4, 2024
Merged

feat(sequencer): add allowed_fee_asset_ids abci query and sequencer_client support#1127
itamarreif merged 18 commits intomainfrom
itamarreif/sequencer-allowed-fee-assets

Conversation

@itamarreif
Copy link
Contributor

@itamarreif itamarreif commented May 30, 2024

Summary

This adds the allowed_fee_asset_ids ABCI info query and the required sequencer_client methods to use it.

Background

This is required for the bridge implementation and other off-chain services to check against local configs on startup.

Changes

  • add FeeAssetsResponse to protocolapis/astria/protocol/asset/types.proto
  • add native type to `astria-core::protocol::asset
  • add query function to astria-core::protocol::asset::query
  • add query function to query router
  • add unit tests
    • response into/from raw
    • query
    • missing unit tests for DenomResponse::into_raw/from_raw (unrelated but this was on the way and took 2 seconds)

sequencer client

  • add query method to the client extension crate
    • should the try_from_raw failure return a different error kind than abci_query_deserialization
  • blackbox? integration? test

Testing

  • unit tests for raw protobuf types to native types conversions
  • unit test for the sequencer-side logic for the abci query
  • blackbox/integration test for the sequencer_client

@itamarreif itamarreif added sequencer pertaining to the astria-sequencer crate bridging labels May 30, 2024
@itamarreif itamarreif requested a review from noot May 30, 2024 22:41
@itamarreif itamarreif self-assigned this May 30, 2024
@github-actions github-actions bot added the proto pertaining to the Astria Protobuf spec label May 30, 2024
@itamarreif itamarreif marked this pull request as ready for review May 30, 2024 22:57
@itamarreif itamarreif requested review from a team as code owners May 30, 2024 22:57
)
.map_err(|e| {
Error::abci_query_deserialization(
"astria.protocol.asset.v1alpha1.AllowedFeeAssetIdsResponse",
Copy link
Contributor

@noot noot Jun 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"astria.protocol.asset.v1alpha1.AllowedFeeAssetIdsResponse",
astria_core::generated::protocol::asset::v1alpha1::AllowedFeeAssetIdsResponse::name(),

with use prost::Name as _;

Copy link
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'd only rethink the naming of the error when constructing the response. It's IMO cleaner to introduce a new bespoke error for every conversion.

@itamarreif itamarreif added this pull request to the merge queue Jun 4, 2024
Merged via the queue into main with commit f0acb1c Jun 4, 2024
@itamarreif itamarreif deleted the itamarreif/sequencer-allowed-fee-assets branch June 4, 2024 22:06
steezeburger added a commit that referenced this pull request Jun 5, 2024
* main:
  fix(charts): conductor configmap fix (#1146)
  feat(sequencer): add `allowed_fee_asset_ids` abci query and `sequencer_client` support (#1127)
  chore(conductor): release conductor 0.17 (#1139)
  feat: use macro to declare metric constants (#1129)
  refactor(merkle): remove source of panics in audit API (#1137)
  feat(conductor): skip outdated block metadata (#1120)
  refactor(sequencer): remove mint module (#1134)
  feat(bridge-withdrawer): add justfile (#1135)
  chore(chart): change evm back to latest on dev (#1132)
  feat(conductor, proto)!: celestia base heights in commitment state (#1121)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bridging proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants