Skip to content

feat(sequencer): implement bridge/account_last_tx_hash abci query#1158

Merged
noot merged 4 commits intomainfrom
noot/last-bridge-tx
Jun 6, 2024
Merged

feat(sequencer): implement bridge/account_last_tx_hash abci query#1158
noot merged 4 commits intomainfrom
noot/last-bridge-tx

Conversation

@noot
Copy link
Copy Markdown
Contributor

@noot noot commented Jun 5, 2024

Summary

implement bridge/account_last_tx_hash abci query which returns the last executed tx from the given bridge account.

Background

required for the bridge withdrawer's sync logic (or rather, makes it much simpler to implement).

Changes

  • if a bridge account makes a tx, store this tx hash in the nonconsensus storage.
  • implement bridge/account_last_tx_hash abci query which queries the nonconsensus storage for this tx hash given some address.
  • TODO: we can make this a config value, so only nodes that are configured to store this data store it.

Testing

unit tests

Related Issues

closes #1107

@noot noot requested review from a team as code owners June 5, 2024 21:20
@noot noot requested a review from SuperFluffy June 5, 2024 21:20
@github-actions github-actions bot added proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate labels Jun 5, 2024
.context("invalid path: `asset/allowed_fee_asset_ids`")?;
query_router
.insert(
"bridge/account_last_tx_hash/:address",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not blocking here, because this matches existing pattern but I'd prefer to have resource name style path based queries is /resource-type/{id}/sub-resource-type/{id}. In this instance that would be bridge/{address}/last_tx_hash so it's clear who owns what property hierarchically. The last_tx_hash is a property of the address, which is a bridge.

This would apply to all our queries though.

@noot noot added this pull request to the merge queue Jun 6, 2024
Merged via the queue into main with commit 3e22a60 Jun 6, 2024
@noot noot deleted the noot/last-bridge-tx branch June 6, 2024 17:23
steezeburger added a commit that referenced this pull request Jun 10, 2024
* main:
  fix: ignore RUSTSEC-2021-0139 (#1171)
  chore(sequencer-relayer)!: remove functionality to restrict relaying blocks to only those proposed by a given validator (#1168)
  chore(metrics): update `metric_name` macro to handle a collection of names (#1163)
  fix(bridge-withdrawer): skip linting generated contract code (#1172)
  fix(core, sequencer): prefix removal source non-refund ics20 packet (#1162)
  chore(docs): add sequencer-relayer doc to specs (#1126)
  feat(bridge-withdrawer): sync logic (#1165)
  chore(withdrawer): replace contracts with `astria-bridge-contracts` submodule (#1164)
  feat(sequencer)!: implement bridge sudo and withdrawer addresses (#1142)
  feat(sequencer): implement refund to rollup logic upon ics20 transfer refund (#1161)
  feat(bridge-withdrawer): bridge withdrawer startup (#1160)
  feat(core, proto)!: add bech32m addresses (#1124)
  feat(withdrawer): bridged ERC20 token withdrawals (#1149)
  feat(sequencer-relayer)!: add chain IDs for sequencer and Celestia to config env vars (#1063)
  test(bridge-withdrawer): add submitter tests (#1133)
  chore: bump penumbra deps (#1159)
  feat(sequencer): implement `bridge/account_last_tx_hash` abci query (#1158)
  fix(withdrawer): use block subscription in batcher; send to destination_chain_address (#1157)
  fix(withdrawer): update AstriaWithdrawer to check that withdrawal value is sufficient (#1148)
  chore(ci): build bridge withdrawer images (#1156)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

sequencer: Add endpoint for last block height in which a transaction was made for bridge account

2 participants