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

Implement Express Lane Timeboost #2561

Open
wants to merge 301 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
ca1b913
add configs for binary
rauljordan Aug 6, 2024
8a81d3e
use single config
rauljordan Aug 6, 2024
4e6b1e6
test passing for redis stream
rauljordan Aug 7, 2024
49ca6fa
specify the privileged sequencer endpoint for auctioneer
rauljordan Aug 7, 2024
840be36
privileged endpoint
rauljordan Aug 7, 2024
84ab0d1
move system test
rauljordan Aug 7, 2024
8fccf2c
use stopwaiter
rauljordan Aug 7, 2024
7bb8e3b
edit test
rauljordan Aug 7, 2024
1a41c25
fix up db and store bids correctly
rauljordan Aug 7, 2024
f997721
all tests passing once more
rauljordan Aug 7, 2024
6a0afaf
rem ctx
rauljordan Aug 7, 2024
9c4af2a
add jwt auth for auctioneer to sequencer
rauljordan Aug 7, 2024
40f4f24
authenticated, use call iteratively
rauljordan Aug 7, 2024
60fefb5
update contracts
rauljordan Aug 8, 2024
27b9a0c
test pass
rauljordan Aug 8, 2024
bd47e80
sequencer checks within auction closing
rauljordan Aug 8, 2024
c5fc048
sequencer endpoint in cfg
rauljordan Aug 8, 2024
91373de
add method to bid
rauljordan Aug 8, 2024
a9b2bdd
productionize bidder client
rauljordan Aug 8, 2024
4ed60df
tests passing
rauljordan Aug 8, 2024
b8b4483
productionize bidder client
rauljordan Aug 8, 2024
119e1bb
system test pass
rauljordan Aug 8, 2024
27e63db
contracts
rauljordan Aug 8, 2024
203a8ad
edit
rauljordan Aug 8, 2024
e7b0fa3
move express lane client to system test
rauljordan Aug 9, 2024
7396c62
Auctioneer metrics: bids and value (part 1)
terencechain Aug 12, 2024
02e3698
resolve confs
rauljordan Aug 19, 2024
c315dd8
tidy
rauljordan Aug 19, 2024
e6c6def
Merge branch 'express-lane-timeboost' of github.com:OffchainLabs/nitr…
rauljordan Aug 19, 2024
d40cee9
Update timeboost/ticker.go
rauljordan Aug 19, 2024
7b63dc9
condition
rauljordan Aug 19, 2024
1aaf4da
limit bids
rauljordan Aug 19, 2024
6705b06
last second leeway for bid processing
rauljordan Aug 19, 2024
ab55292
resolve wait a second
rauljordan Aug 19, 2024
7a70988
dont hardcode ports
rauljordan Aug 19, 2024
47697ed
Merge branch 'master' into express-lane-timeboost
rauljordan Aug 19, 2024
26f28d4
Merge branch 'master' into express-lane-timeboost
rauljordan Aug 19, 2024
d9307d8
Merge branch 'express-lane-timeboost' of github.com:OffchainLabs/nitr…
rauljordan Aug 19, 2024
e4892b2
geth pin
rauljordan Aug 19, 2024
4dc427a
add in new queue
rauljordan Aug 19, 2024
e2110ab
edits
rauljordan Aug 19, 2024
15e6087
Fix tie breaker and retry resolve bid tx
terencechain Aug 19, 2024
f75f242
edits
rauljordan Aug 20, 2024
ffd0766
commit
rauljordan Aug 20, 2024
a5c8777
rem redundant sig verify
rauljordan Aug 20, 2024
9d53ff7
Merge branch 'master' into express-lane-timeboost
rauljordan Aug 20, 2024
196bdc7
Fix tie breaker and better retry
terencechain Aug 20, 2024
e61c3b2
edit
rauljordan Aug 20, 2024
44c8179
Merge branch 'master' into express-lane-timeboost
rauljordan Aug 20, 2024
981bc6a
Fix duplicated word
terencechain Aug 20, 2024
8db0bd0
Add copyright to express lane service
terencechain Aug 21, 2024
ec185f5
Better popped the auction resolution tx log
terencechain Aug 21, 2024
d15e0c5
Fix auction-contract-address doesnt match the field SequencerEndpoint
terencechain Aug 21, 2024
f28896d
Remove unused conversions
terencechain Aug 21, 2024
3eec686
Fix express lane advantage to 200ms
terencechain Aug 23, 2024
98326dc
Update reserve price
terencechain Aug 21, 2024
3632c66
Filter transfer log
terencechain Aug 23, 2024
8122a49
Tristan's feedback
terencechain Aug 29, 2024
5c03cf0
Tristan's feedback
terencechain Sep 5, 2024
72de9d2
Add timeboosted field to broadcast feed
ganeshvanahalli Sep 24, 2024
fa457b1
Fix autonomous-auctioner cli startup
Tristan-Wilson Oct 1, 2024
97f7c18
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
ganeshvanahalli Oct 2, 2024
1781ae3
change timeboosted byte array calculation
ganeshvanahalli Oct 2, 2024
a713900
address PR comments
ganeshvanahalli Oct 2, 2024
811fd19
define IsTxTimeboosted on the BlockMetadata type
ganeshvanahalli Oct 2, 2024
b67b08b
only write blockMetadata to db when its non-nil, prevents erasing of …
ganeshvanahalli Oct 11, 2024
0ff4f7d
Start rpc stack after creating bid validator
Tristan-Wilson Oct 11, 2024
b8890a1
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 11, 2024
7a2eb14
Plumbing to be able to start timeboost in nitro
Tristan-Wilson Oct 11, 2024
572d4b2
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 11, 2024
5fda4c4
use arbostypes.BlockMetadata return type instead of []byte for BlockM…
ganeshvanahalli Oct 14, 2024
0d3d83d
Publish Timeboost BlockMetadata to Sequencer Coordinator's redis
ganeshvanahalli Oct 14, 2024
d72fd38
Fix various linter and compilation issues
Tristan-Wilson Oct 14, 2024
a5b3eea
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 14, 2024
2cd1ed0
Fix cyclic dependency in test
Tristan-Wilson Oct 14, 2024
13a9e0e
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 14, 2024
9a85c95
Merge branch 'add-timeboosted-broadcastfeedmessage' into publish-bloc…
ganeshvanahalli Oct 14, 2024
f4efcd9
Move where timeboost is started to avoid circ dep
Tristan-Wilson Oct 15, 2024
d3cd8f5
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 15, 2024
651277d
Temp fix for timeboost startup race cond, fix NPE
Tristan-Wilson Oct 15, 2024
a19acb6
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 15, 2024
31ea7be
Retry initial call on express lane contract
Tristan-Wilson Oct 16, 2024
0aa68ef
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 16, 2024
3835dff
Persist Auctioneer Bid DB to S3
ganeshvanahalli Oct 18, 2024
03fa6a4
complete plumbing
ganeshvanahalli Oct 18, 2024
d1890da
Add bidder-client exe for timeboost deposits/bids
Tristan-Wilson Oct 18, 2024
bf8adc5
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Oct 18, 2024
81ab68b
handle empty bids case
ganeshvanahalli Oct 21, 2024
8200213
Enable reading of bids from large sql database in chunks to avoid OOMing
ganeshvanahalli Oct 21, 2024
15ba495
Merge branch 'express-lane-timeboost' into persist-auctioneerbids-s3
ganeshvanahalli Oct 21, 2024
103b395
Clear bidsPerSenderInRound when auction closes
Tristan-Wilson Oct 23, 2024
d60de53
Timeboost Bulk Metadata API
ganeshvanahalli Oct 24, 2024
712b3ad
validate BlockMetadataApiCacheSize
ganeshvanahalli Oct 24, 2024
ee5bfd6
Merge branch 'express-lane-timeboost' into bulk-blockmetadata-api
ganeshvanahalli Oct 24, 2024
86ee92b
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
ganeshvanahalli Oct 24, 2024
3bb87ee
Merge branch 'add-timeboosted-broadcastfeedmessage' into bulk-blockme…
ganeshvanahalli Oct 24, 2024
3431e2c
Use FilterSystem for ContractFilterer in ELS
Tristan-Wilson Oct 24, 2024
952cd37
move BlockMetadataAtCount into ConsensusInfo
ganeshvanahalli Oct 25, 2024
cad5b12
Fix SequenceNumber attribute and decode order
TucksonDev Oct 25, 2024
857823c
update arb_getRawBlockMetadata to accept rpc.BlockNumber inputs inste…
ganeshvanahalli Oct 28, 2024
851d2bd
protect BulkBlockMetadataFetcher's cache with mutex
ganeshvanahalli Oct 28, 2024
4c07677
Enable caching of blockMetadata by default and clear cache when reorg…
ganeshvanahalli Oct 28, 2024
2148c35
address PR comments
ganeshvanahalli Oct 28, 2024
4da2511
Merge branch 'add-timeboosted-broadcastfeedmessage' into publish-bloc…
ganeshvanahalli Oct 28, 2024
b6ea4f5
Fix panic when transferring express lane controller due to race in lr…
amsanghi Oct 28, 2024
18cddc5
address PR comments
ganeshvanahalli Oct 28, 2024
d64ce27
Adapter for ContractFilterer
Tristan-Wilson Oct 28, 2024
4383d52
small fix
ganeshvanahalli Oct 29, 2024
9c9e1b9
Merge pull request #2757 from OffchainLabs/fix_race_lru
Tristan-Wilson Oct 29, 2024
bbab516
Add a boolean field to tx receipt object indicating if the tx was tim…
ganeshvanahalli Oct 29, 2024
1cb9731
Update execution/gethexec/express_lane_service.go
Tristan-Wilson Oct 29, 2024
fe0f243
Merge branch 'express-lane-timeboost' into express-lane-fix-sequence-…
Tristan-Wilson Oct 29, 2024
1d7a645
Merge pull request #2756 from TucksonDev/express-lane-fix-sequence-nu…
Tristan-Wilson Oct 29, 2024
0ae3c89
Merge remote-tracking branch 'origin/express-lane-timeboost' into exp…
Tristan-Wilson Oct 29, 2024
d299eea
Remove timeboost sequencer url config opt
Tristan-Wilson Oct 29, 2024
4567b0a
Fix typo causing panic
amsanghi Oct 30, 2024
d20c821
Merge pull request #2763 from OffchainLabs/fix_panic
Tristan-Wilson Oct 30, 2024
1ad12ca
Fix timeboost auction resolution queue handling
Tristan-Wilson Oct 30, 2024
181932e
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson Nov 1, 2024
2c1e0e5
Bulk sync missing blockMetadata
ganeshvanahalli Nov 1, 2024
aaf051f
Post merge fixes, mostly stricter linter from 1.23
Tristan-Wilson Nov 4, 2024
f653c95
Allow wider range of RoundTimingInfo + validation
Tristan-Wilson Nov 4, 2024
47ff5ee
Fix auction closed test
Tristan-Wilson Nov 5, 2024
f8e8aa9
Fix max bids OBOE
Tristan-Wilson Nov 5, 2024
71c8c84
Bind AuthPort to random number to avoid collision
Tristan-Wilson Nov 5, 2024
06dc0ab
Fix OBOE in validator in a better way, fix test
Tristan-Wilson Nov 5, 2024
c4f4316
delete affected missing blockMetadata trackers from ArbDB in case of …
ganeshvanahalli Nov 6, 2024
4722102
add plumbing to allow starting BlockMetadataRebuilder
ganeshvanahalli Nov 6, 2024
df96876
test bulk syncing of missing blockMetadata
ganeshvanahalli Nov 6, 2024
87af748
address PR comments
ganeshvanahalli Nov 7, 2024
c0acac1
rename reorgEventsReader to reorgEventsNotifier
ganeshvanahalli Nov 7, 2024
8b7182d
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson Nov 7, 2024
31c950f
Merge branch 'express-lane-timeboost' into express-lane-timeboost-inp…
Tristan-Wilson Nov 7, 2024
d8137ec
minor bug fixes and improvements
ganeshvanahalli Nov 8, 2024
7219c33
Set dep of arbitrator/langs/bf to match master
Tristan-Wilson Nov 8, 2024
75acee8
Merge branch 'express-lane-timeboost' into express-lane-timeboost-inp…
Tristan-Wilson Nov 8, 2024
fa93c2c
Forgot to commit RoundTimingInfo validation
Tristan-Wilson Nov 8, 2024
7f9e5b6
Reorder express lane tx validation
Tristan-Wilson Nov 8, 2024
feaf306
address PR comments
ganeshvanahalli Nov 12, 2024
dfe0c51
address PR comments
ganeshvanahalli Nov 12, 2024
b031d13
Merge branch 'bulk-blockmetadata-api' into bulksyncing-missing-blockm…
ganeshvanahalli Nov 12, 2024
41d7436
merge express-lane-timeboost and resolve conflicts
ganeshvanahalli Nov 12, 2024
b7d1b06
Rename delay param to isExpressLaneController
Tristan-Wilson Nov 12, 2024
436f831
Use ptr to sequencer instead of member fn for ES
Tristan-Wilson Nov 12, 2024
b991d76
Change log level for future EL sequence number
Tristan-Wilson Nov 12, 2024
bab0157
address PR comments
ganeshvanahalli Nov 13, 2024
a5f248d
make flag description clearer
ganeshvanahalli Nov 13, 2024
f5ca4bf
Use interface instead of ptr to seq for tests
Tristan-Wilson Nov 13, 2024
a8a6369
Add early timeboost submission grace period
Tristan-Wilson Nov 13, 2024
3c491aa
update geth pin
ganeshvanahalli Nov 14, 2024
23869a2
Fix reversed boolean condition
Tristan-Wilson Nov 15, 2024
71f9c5a
address PR comments
ganeshvanahalli Nov 18, 2024
b865417
address PR comments and track last delete failure from sqlDB to preve…
ganeshvanahalli Nov 20, 2024
7dfe40d
Merge remote-tracking branch 'origin/express-lane-timeboost' into exp…
Tristan-Wilson Nov 20, 2024
b13c89a
Merge pull request #2762 from OffchainLabs/express-lane-timeboost-rem…
Tristan-Wilson Nov 20, 2024
a812410
Merge branch 'express-lane-timeboost' into express-lane-timeboost-fix…
Tristan-Wilson Nov 20, 2024
6933b94
Merge pull request #2764 from OffchainLabs/express-lane-timeboost-fix…
Tristan-Wilson Nov 20, 2024
287f74a
Merge pull request #2775 from OffchainLabs/express-lane-timeboost-inp…
Tristan-Wilson Nov 20, 2024
066ff17
Merge remote-tracking branch 'origin/express-lane-timeboost' into exp…
Tristan-Wilson Nov 20, 2024
dc65eef
Merge remote-tracking branch 'origin/expres-lane-timeboost-fix-pr-com…
Tristan-Wilson Nov 20, 2024
969dc1d
Refactor stubPublisher
Tristan-Wilson Nov 20, 2024
5a02894
Change transactionPublisher interface
Tristan-Wilson Nov 20, 2024
5e450cd
Merge remote-tracking branch 'origin/expres-lane-timeboost-fix-pr-com…
Tristan-Wilson Nov 20, 2024
2bea5ca
Loop for round check
Tristan-Wilson Nov 20, 2024
cc75bf2
Remove uncessary locking
Tristan-Wilson Nov 21, 2024
9bf924f
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson Nov 21, 2024
7356aaf
Automatic import cleanup
Tristan-Wilson Nov 21, 2024
3b67813
Merge branch 'express-lane-timeboost' into expres-lane-timeboost-fix-…
Tristan-Wilson Nov 21, 2024
cee611d
Merge pull request #2787 from OffchainLabs/expres-lane-timeboost-fix-…
Tristan-Wilson Nov 21, 2024
bc93214
address PR comments
ganeshvanahalli Nov 21, 2024
06b94b0
merge upstream and resolve conflicts
ganeshvanahalli Nov 21, 2024
0178eb7
clear blockMetadata if there's a mismatch between feed's blockhash an…
ganeshvanahalli Nov 21, 2024
fbbc94e
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson Nov 21, 2024
bcabeaa
Fix race condition around checking current round
Tristan-Wilson Nov 21, 2024
4c295c5
Use EIP712 signing scheme for bids
Tristan-Wilson Nov 26, 2024
dab4225
Fix bug where bid counts weren't reset
Tristan-Wilson Dec 9, 2024
06ea35b
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson Dec 9, 2024
5f52169
Merge branch 'express-lane-timeboost-early-submission-grace' into exp…
Tristan-Wilson Dec 9, 2024
0d607f7
Fix duplicated case, better name for ticker
Tristan-Wilson Dec 11, 2024
bb1dc9f
Fix timeboost round control transfer
Tristan-Wilson Dec 11, 2024
8175908
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson Dec 11, 2024
45ca632
Merge branch 'express-lane-timeboost-early-submission-grace' into exp…
Tristan-Wilson Dec 11, 2024
4863402
auctioneer should close the ackNotifier after setting the result
ganeshvanahalli Dec 11, 2024
c2b85d2
Move currentTime into loop
Tristan-Wilson Dec 11, 2024
6b8fd67
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson Dec 11, 2024
e1344f7
Merge pull request #2788 from OffchainLabs/express-lane-timeboost-ear…
Tristan-Wilson Dec 11, 2024
45773a3
Merge branch 'express-lane-timeboost' into express-lane-timeboost-eip…
Tristan-Wilson Dec 11, 2024
cb71840
Merge pull request #2808 from OffchainLabs/express-lane-timeboost-eip…
Tristan-Wilson Dec 11, 2024
5e408da
Fix round control transfer to same check
Tristan-Wilson Dec 12, 2024
e64520f
Timeboost-test: Express lane control transfer
ganeshvanahalli Dec 13, 2024
a90a817
Include bidder addr in bid validator errors
Tristan-Wilson Dec 16, 2024
dea14a5
make timeboost testing structure more modular
ganeshvanahalli Dec 16, 2024
0d8c195
wait for controller change on sequencer side
ganeshvanahalli Dec 16, 2024
7780636
Merge branch 'express-lane-timeboost' into test-expresslanecontrol-tr…
ganeshvanahalli Dec 16, 2024
e857141
merge upstream and resolve conflicts
ganeshvanahalli Dec 16, 2024
0d23279
merge upstream
ganeshvanahalli Dec 16, 2024
e1798b4
use ticker to allow for timely posting of bids to s3
ganeshvanahalli Dec 16, 2024
89c0f53
Include seq number in EL submission error
Tristan-Wilson Dec 17, 2024
1799f2c
update batch name to firstRound-lastRound to improve ux and allow for…
ganeshvanahalli Dec 17, 2024
929a5e9
fix typo
ganeshvanahalli Dec 17, 2024
5cd6169
Merge branch 'express-lane-timeboost' into persist-auctioneerbids-s3
ganeshvanahalli Dec 17, 2024
c9a42e2
Refactor RoundTimingInfo, fix auctionCloseTicker
Tristan-Wilson Dec 18, 2024
3f3aba0
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ref…
Tristan-Wilson Dec 18, 2024
bbc703a
Merge pull request #2841 from OffchainLabs/express-lane-timeboost-ref…
Tristan-Wilson Dec 18, 2024
a998a41
merge upstream
ganeshvanahalli Dec 18, 2024
2e80697
Merge pull request #2833 from OffchainLabs/test-expresslanecontrol-tr…
ganeshvanahalli Dec 18, 2024
63ba4d4
Update timeboost/roundtiminginfo.go
Tristan-Wilson Dec 20, 2024
a719c5c
Fix processing of transactions in expressLaneService
ganeshvanahalli Dec 20, 2024
9967120
fix lint errors
ganeshvanahalli Dec 23, 2024
72fb72a
fix race in expresslaneservice_test file
ganeshvanahalli Dec 23, 2024
a449e92
add a system test to test transaction handling
ganeshvanahalli Dec 23, 2024
1837035
fix race in TestBidValidatorAuctioneerRedisStream
ganeshvanahalli Dec 23, 2024
1f73102
fix CI lint and race errors
ganeshvanahalli Dec 26, 2024
8016d82
merge master
ganeshvanahalli Dec 26, 2024
8eeb797
Merge branch 'express-lane-timeboost' into persist-auctioneerbids-s3
ganeshvanahalli Dec 26, 2024
7e47ce2
address PR comments
ganeshvanahalli Dec 26, 2024
e9fc4a7
merge upstream and resolve conflicts
ganeshvanahalli Dec 26, 2024
d87c63c
fix lint error
ganeshvanahalli Dec 26, 2024
910a375
address PR comments
ganeshvanahalli Dec 26, 2024
6843fce
merge upstream and resolve conflicts
ganeshvanahalli Dec 26, 2024
68388dd
check that timed out express-lane tx returns an error
ganeshvanahalli Dec 26, 2024
0199caf
fix CI error
ganeshvanahalli Dec 26, 2024
8cacbb2
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson Dec 27, 2024
54be46a
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson Dec 27, 2024
77df3c7
fix stubPublisher in express_lane_service_test.go
ganeshvanahalli Dec 27, 2024
e4da075
Merge pull request #2745 from OffchainLabs/persist-auctioneerbids-s3
Tristan-Wilson Dec 27, 2024
6b99351
Merge pull request #2695 from OffchainLabs/add-timeboosted-broadcastf…
Tristan-Wilson Dec 27, 2024
a319bb5
Merge pull request #2735 from OffchainLabs/publish-blockmetadata-seqc…
Tristan-Wilson Dec 27, 2024
9955576
merge upstream
ganeshvanahalli Dec 27, 2024
704c61a
merge upstream
ganeshvanahalli Dec 27, 2024
a77252f
fix lint errors
ganeshvanahalli Dec 27, 2024
1155dea
merge upstream
ganeshvanahalli Dec 27, 2024
558e0fb
merge upstream
ganeshvanahalli Dec 27, 2024
411b1cd
fix lint errors
ganeshvanahalli Dec 27, 2024
067b687
fix minor issues with config
ganeshvanahalli Dec 27, 2024
8d759a9
add required default flag to --dev and nitro testnode
ganeshvanahalli Dec 27, 2024
f140a1d
enable checking for BlockHashMismatchLogMsg in the test logs
ganeshvanahalli Dec 27, 2024
e775ef2
test that express lane control switch happens seamlessly in extreme c…
ganeshvanahalli Dec 28, 2024
e18f1a2
Merge branch 'express-lane-timeboost' into fix-expresslaneservice-txp…
ganeshvanahalli Dec 28, 2024
f17852c
address PR comments
ganeshvanahalli Dec 30, 2024
925bb74
Merge pull request #2754 from OffchainLabs/bulk-blockmetadata-api
Tristan-Wilson Dec 30, 2024
d79ffde
Merge pull request #2760 from OffchainLabs/include-timeboosted-receip…
Tristan-Wilson Dec 30, 2024
1d7f045
merge upstream
ganeshvanahalli Dec 30, 2024
f1f1198
resolve conflicts
ganeshvanahalli Dec 30, 2024
a9bbd0b
Merge pull request #2765 from OffchainLabs/bulksyncing-missing-blockm…
ganeshvanahalli Dec 30, 2024
3b96d19
merge upstream
ganeshvanahalli Dec 30, 2024
2ac7fea
Merge pull request #2850 from OffchainLabs/fix-expresslaneservice-txp…
ganeshvanahalli Dec 30, 2024
090abb7
update geth pin
ganeshvanahalli Dec 30, 2024
9cb8dbb
update seq_filter_test
ganeshvanahalli Dec 30, 2024
d624150
fix blockhash mismatch issue in tests
ganeshvanahalli Dec 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
express lane client send transaction
  • Loading branch information
rauljordan committed Jul 29, 2024
commit d7eb164ae7eb809a9e4c87f59f1cd72f7d56f1f4
45 changes: 22 additions & 23 deletions timeboost/auctioneer.go
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/rpc"
"github.com/offchainlabs/nitro/solgen/go/express_lane_auctiongen"
"github.com/pkg/errors"
"golang.org/x/crypto/sha3"
@@ -21,6 +22,8 @@ import (
// It is intended to be immutable after initialization.
var domainValue []byte

const AuctioneerNamespace = "auctioneer"

func init() {
hash := sha3.NewLegacyKeccak256()
hash.Write([]byte("TIMEBOOST_BID"))
@@ -49,22 +52,23 @@ type Auctioneer struct {
}

func EnsureValidationExposedViaAuthRPC(stackConf *node.Config) {
// found := false
// for _, module := range stackConf.AuthModules {
// if module == server_api.Namespace {
// found = true
// break
// }
// }
// if !found {
// stackConf.AuthModules = append(stackConf.AuthModules, server_api.Namespace)
// }
found := false
for _, module := range stackConf.AuthModules {
if module == AuctioneerNamespace {
found = true
break
}
}
if !found {
stackConf.AuthModules = append(stackConf.AuthModules, AuctioneerNamespace)
}
}

// NewAuctioneer creates a new autonomous auctioneer struct.
func NewAuctioneer(
txOpts *bind.TransactOpts,
chainId []uint64,
stack *node.Node,
client Client,
auctionContract *express_lane_auctiongen.ExpressLaneAuction,
opts ...AuctioneerOpt,
@@ -82,18 +86,6 @@ func NewAuctioneer(
if err != nil {
return nil, err
}

node := &node.Node{}
_ = node
// valAPIs := []rpc.API{{
// Namespace: server_api.Namespace,
// Version: "1.0",
// Service: serverAPI,
// Public: config.ApiPublic,
// Authenticated: config.ApiAuth,
// }}
// stack.RegisterAPIs(valAPIs)

am := &Auctioneer{
txOpts: txOpts,
chainId: chainId,
@@ -111,6 +103,14 @@ func NewAuctioneer(
for _, o := range opts {
o(am)
}
auctioneerApi := &AuctioneerAPI{am}
valAPIs := []rpc.API{{
Namespace: AuctioneerNamespace,
Version: "1.0",
Service: auctioneerApi,
Public: true,
}}
stack.RegisterAPIs(valAPIs)
return am, nil
}

@@ -221,7 +221,6 @@ func (a *Auctioneer) checkSequencerHealth(ctx context.Context) {
}

// TODO(Terence): Set reserve price from the contract.

func (a *Auctioneer) fetchReservePrice() *big.Int {
a.reservePriceLock.RLock()
defer a.reservePriceLock.RUnlock()
59 changes: 59 additions & 0 deletions timeboost/express_lane_client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package timeboost

import (
"context"
"crypto/ecdsa"
"fmt"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/rpc"
"github.com/offchainlabs/nitro/util/containers"
"github.com/offchainlabs/nitro/util/stopwaiter"
)

type ExpressLaneClient struct {
stopwaiter.StopWaiter
privKey *ecdsa.PrivateKey
chainId uint64
initialRoundTimestamp time.Time
roundDuration time.Duration
auctionContractAddr common.Address
client *rpc.Client
}

func (elc *ExpressLaneClient) SendTransaction(transaction *types.Transaction) containers.PromiseInterface[struct{}] {
return stopwaiter.LaunchPromiseThread[struct{}](elc, func(ctx context.Context) (struct{}, error) {
msg := &ExpressLaneSubmission{
ChainId: elc.chainId,
Round: CurrentRound(elc.initialRoundTimestamp, elc.roundDuration),
AuctionContractAddress: elc.auctionContractAddr,
Transaction: transaction,
}
signingMsg, err := msg.ToMessageBytes()
if err != nil {
return struct{}{}, err
}
signature, err := signSubmission(signingMsg, elc.privKey)
if err != nil {
return struct{}{}, err
}
msg.Signature = signature
err = elc.client.CallContext(ctx, nil, "timeboost_newExpressLaneSubmission", msg)
return struct{}{}, err
})
}

func signSubmission(message []byte, key *ecdsa.PrivateKey) ([]byte, error) {
prefixed := crypto.Keccak256(append([]byte(fmt.Sprintf("\x19Ethereum Signed Message:\n%d", len(message))), message...))
sig, err := secp256k1.Sign(prefixed, math.PaddedBigBytes(key.D, 32))
if err != nil {
return nil, err
}
sig[64] += 27
return sig, nil
}