Skip to content
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

Enforce L1AttributesTx in adapters #164

Open
NiloCK opened this issue Aug 21, 2024 · 1 comment
Open

Enforce L1AttributesTx in adapters #164

NiloCK opened this issue Aug 21, 2024 · 1 comment

Comments

@NiloCK
Copy link
Collaborator

NiloCK commented Aug 21, 2024

In #148, AdaptCosmosTxsToEthTxs was altered to return an error if deposit tx bytes fail to unmarshal as an ethtypes.Transaction.

We should follow up with a specific check that an L1AttributesTx exists, and this check should apply on each adapter (eth->cosmos, cosmos->eth).

@NiloCK
Copy link
Collaborator Author

NiloCK commented Aug 26, 2024

Each adapter currently errors if there are no deposit txs:

(PayloadTxToCosmosTx)

monomer/adapters.go

Lines 38 to 40 in bd24e9a

if numDepositTxs == 0 {
return nil, errL1AttributesNotFound
}

(CosmosTxsToEthTxs)

monomer/adapters.go

Lines 107 to 109 in bd24e9a

if len(ethTxsBytes) == 0 {
return nil, errL1AttributesNotFound
}

But these checks implicitly assume that any collection of deposit txs will have an L1AttributesTx at the first position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant