Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

feat: Lane's with custom tx adapters #239

Merged
merged 23 commits into from
Nov 28, 2023
Merged

feat: Lane's with custom tx adapters #239

merged 23 commits into from
Nov 28, 2023

Conversation

davidterpay
Copy link
Contributor

@davidterpay davidterpay commented Nov 27, 2023

In this PR, I extend the signer adapter interface to be a part of each lane primarily because this will be tremendously helpful in logging proposals as they are built as this will allow us to intro-spec things like priority, signers, and more by lane.

Each lane already defines its own signer adapter, I just extend it a bit more by making the lane have to implement GetTxInfo which returns lane specific information about a transaction, including its priority.

@davidterpay davidterpay added backport/v1.x.x Backport your PR to the v1.x.x release backport/v2.x.x Backport your PR to the v2.x.x release labels Nov 27, 2023
Base automatically changed from terpay/escrow-address-string to main November 27, 2023 22:10
@davidterpay davidterpay marked this pull request as ready for review November 27, 2023 23:12
@@ -14,8 +14,8 @@ func TxPriority(config Factory) base.TxPriority[string] {
return base.TxPriority[string]{
GetTxPriority: func(goCtx context.Context, tx sdk.Tx) string {
bidInfo, err := config.GetAuctionBidInfo(tx)
if err != nil {
panic(err)
if err != nil || bidInfo == nil || bidInfo.Bid.IsNil() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a better worst case in case a faulty tx gets inserted into the MEV lane, gets the lowest priority and will be purged anyways.

Copy link
Contributor

@aljo242 aljo242 left a comment

Choose a reason for hiding this comment

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

mini nits

Comment on lines +112 to +113
WaitForHeight(s.T(), s.chain.(*cosmos.CosmosChain), height+3)
s.T().Logf("reached height %d", height+2)
Copy link
Contributor

Choose a reason for hiding this comment

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

difference between the heights here.

want to just add the logging to WaitForHeight()?

@davidterpay davidterpay merged commit be4465a into main Nov 28, 2023
8 checks passed
@davidterpay davidterpay deleted the terpay/lane-tx-info branch November 28, 2023 18:51
mergify bot pushed a commit that referenced this pull request Nov 28, 2023
* greedy approach to lane verification

* docs

* base lane testing

* mev lane testing nits

* abci top level testing done

* network spamming in E2E

* string rep of escrow address

* nit

* nit

* nit v1.0.1

* removing logs from testing

* query test

* logging with tx info

* nits

* nit

* nit

* testing nit

---------

Co-authored-by: Alex Johnson <[email protected]>
(cherry picked from commit be4465a)

# Conflicts:
#	block/proposals/proposals_test.go
mergify bot pushed a commit that referenced this pull request Nov 28, 2023
* greedy approach to lane verification

* docs

* base lane testing

* mev lane testing nits

* abci top level testing done

* network spamming in E2E

* string rep of escrow address

* nit

* nit

* nit v1.0.1

* removing logs from testing

* query test

* logging with tx info

* nits

* nit

* nit

* testing nit

---------

Co-authored-by: Alex Johnson <[email protected]>
(cherry picked from commit be4465a)
davidterpay added a commit that referenced this pull request Dec 1, 2023
* greedy approach to lane verification

* docs

* base lane testing

* mev lane testing nits

* abci top level testing done

* network spamming in E2E

* string rep of escrow address

* nit

* nit

* nit v1.0.1

* removing logs from testing

* query test

* logging with tx info

* nits

* nit

* nit

* testing nit

---------

Co-authored-by: Alex Johnson <[email protected]>
(cherry picked from commit be4465a)

Co-authored-by: David Terpay <[email protected]>
davidterpay added a commit that referenced this pull request Dec 1, 2023
* feat: Lane's with custom tx adapters (#239)

* greedy approach to lane verification

* docs

* base lane testing

* mev lane testing nits

* abci top level testing done

* network spamming in E2E

* string rep of escrow address

* nit

* nit

* nit v1.0.1

* removing logs from testing

* query test

* logging with tx info

* nits

* nit

* nit

* testing nit

---------

Co-authored-by: Alex Johnson <[email protected]>
(cherry picked from commit be4465a)

# Conflicts:
#	block/proposals/proposals_test.go

* proposal test fix

* decreasing e2e time since its timeouting

---------

Co-authored-by: David Terpay <[email protected]>
Co-authored-by: David Terpay <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/v1.x.x Backport your PR to the v1.x.x release backport/v2.x.x Backport your PR to the v2.x.x release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants