-
Notifications
You must be signed in to change notification settings - Fork 446
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
rauljordan
wants to merge
132
commits into
master
Choose a base branch
from
express-lane-timeboost
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 76 commits
Commits
Show all changes
132 commits
Select commit
Hold shift + click to select a range
9925308
added in timeboost items
rauljordan 4c2c74f
add in
rauljordan d0ed9bf
system test
rauljordan 4ff7410
Rename auction master to autonomous auctioneer
terencechain 83e8e00
Sequence express lane transactions follow spec
terencechain 4b873fa
Merge branch 'rename-auctioneer' into express-lane-timeboost
terencechain 0a7ba8c
include master
rauljordan 81a237b
update contracts repo and bindings
rauljordan 0b7819b
building once more
rauljordan b829d9b
builds
rauljordan 94c5653
autonomous auctioneer bin
rauljordan 676b89e
receive bid test passing
rauljordan d7a91a8
edits and fix sig
rauljordan c5fad5c
passing test
rauljordan f54ac50
add to seq test
rauljordan 4b7a910
system test
rauljordan 9681909
Updated auctioneer with research spec
terencechain fc81996
Merge pull request #2521 from OffchainLabs/auctioneer
terencechain 2fd3327
begin adding sequencer endpoint
rauljordan dcb5525
Clean up auctioneer part 1
terencechain 32e5ffd
Use init for domain value
terencechain 6fd97f4
Tie break bids and unit tests
terencechain d54f89b
Test resolve bids
terencechain c3d8c01
begin adding in endpoints
rauljordan 08cc4f5
Merge branch 'express-lane-timeboost' of github.com:OffchainLabs/nitr…
rauljordan ea852cd
Merge branch 'express-lane-timeboost' into timeboost-endpoints
rauljordan 02bdf45
validate express lane tx submission in sequencer
rauljordan d7eb164
express lane client send transaction
rauljordan 4ad6fcb
adding in and building
rauljordan ca24d8b
auctioneer binary config
rauljordan 083caf0
add back domain
rauljordan 521e7a6
Merge branch 'express-lane-timeboost' into timeboost-endpoints
rauljordan 0c6e15b
do not use 112
rauljordan 98f8dcb
fix test
rauljordan 93ba2cf
wire up the forwarder
rauljordan 8f037de
passing
rauljordan 396c6e9
auction is now happening on L2
rauljordan 65e0dfc
big int chain id
rauljordan d317fa4
contracts on L2 passing test
rauljordan e7a0788
pass resolve auction
rauljordan 889d567
tests and benchmark
rauljordan a33cb28
add sequence number management for express lane submissions
rauljordan 52bbc58
add nonce precedence test
rauljordan 471d79e
add test for too many bids
rauljordan 3b8e6a8
validate bids passing
rauljordan 79dc1ef
resolve auction
rauljordan 91a9188
Add sqlite db for bids
terencechain 5ee3048
Merge branch 'bids-db' into express-lane-timeboost
terencechain 60bbb9f
using redis streams
rauljordan 82860e6
auctioneer server binary
rauljordan bb52e7e
Merge branch 'express-lane-timeboost' of github.com:OffchainLabs/nitr…
rauljordan ca1b913
add configs for binary
rauljordan 8a81d3e
use single config
rauljordan 4e6b1e6
test passing for redis stream
rauljordan 49ca6fa
specify the privileged sequencer endpoint for auctioneer
rauljordan 840be36
privileged endpoint
rauljordan 84ab0d1
move system test
rauljordan 8fccf2c
use stopwaiter
rauljordan 7bb8e3b
edit test
rauljordan 1a41c25
fix up db and store bids correctly
rauljordan f997721
all tests passing once more
rauljordan 6a0afaf
rem ctx
rauljordan 9c4af2a
add jwt auth for auctioneer to sequencer
rauljordan 40f4f24
authenticated, use call iteratively
rauljordan 60fefb5
update contracts
rauljordan 27b9a0c
test pass
rauljordan bd47e80
sequencer checks within auction closing
rauljordan c5fc048
sequencer endpoint in cfg
rauljordan 91373de
add method to bid
rauljordan a9b2bdd
productionize bidder client
rauljordan 4ed60df
tests passing
rauljordan b8b4483
productionize bidder client
rauljordan 119e1bb
system test pass
rauljordan 27e63db
contracts
rauljordan 203a8ad
edit
rauljordan e7b0fa3
move express lane client to system test
rauljordan 7396c62
Auctioneer metrics: bids and value (part 1)
terencechain 02e3698
resolve confs
rauljordan c315dd8
tidy
rauljordan e6c6def
Merge branch 'express-lane-timeboost' of github.com:OffchainLabs/nitr…
rauljordan d40cee9
Update timeboost/ticker.go
rauljordan 7b63dc9
condition
rauljordan 1aaf4da
limit bids
rauljordan 6705b06
last second leeway for bid processing
rauljordan ab55292
resolve wait a second
rauljordan 7a70988
dont hardcode ports
rauljordan 47697ed
Merge branch 'master' into express-lane-timeboost
rauljordan 26f28d4
Merge branch 'master' into express-lane-timeboost
rauljordan d9307d8
Merge branch 'express-lane-timeboost' of github.com:OffchainLabs/nitr…
rauljordan e4892b2
geth pin
rauljordan 4dc427a
add in new queue
rauljordan e2110ab
edits
rauljordan 15e6087
Fix tie breaker and retry resolve bid tx
terencechain f75f242
edits
rauljordan ffd0766
commit
rauljordan a5c8777
rem redundant sig verify
rauljordan 9d53ff7
Merge branch 'master' into express-lane-timeboost
rauljordan 196bdc7
Fix tie breaker and better retry
terencechain e61c3b2
edit
rauljordan 44c8179
Merge branch 'master' into express-lane-timeboost
rauljordan 981bc6a
Fix duplicated word
terencechain 8db0bd0
Add copyright to express lane service
terencechain ec185f5
Better popped the auction resolution tx log
terencechain d15e0c5
Fix auction-contract-address doesnt match the field SequencerEndpoint
terencechain f28896d
Remove unused conversions
terencechain 3eec686
Fix express lane advantage to 200ms
terencechain 98326dc
Update reserve price
terencechain 3632c66
Filter transfer log
terencechain 8122a49
Tristan's feedback
terencechain 5c03cf0
Tristan's feedback
terencechain fa457b1
Fix autonomous-auctioner cli startup
Tristan-Wilson 0ff4f7d
Start rpc stack after creating bid validator
Tristan-Wilson 7a2eb14
Plumbing to be able to start timeboost in nitro
Tristan-Wilson d72fd38
Fix various linter and compilation issues
Tristan-Wilson 2cd1ed0
Fix cyclic dependency in test
Tristan-Wilson f4efcd9
Move where timeboost is started to avoid circ dep
Tristan-Wilson 651277d
Temp fix for timeboost startup race cond, fix NPE
Tristan-Wilson 31ea7be
Retry initial call on express lane contract
Tristan-Wilson d1890da
Add bidder-client exe for timeboost deposits/bids
Tristan-Wilson 103b395
Clear bidsPerSenderInRound when auction closes
Tristan-Wilson cad5b12
Fix SequenceNumber attribute and decode order
TucksonDev b6ea4f5
Fix panic when transferring express lane controller due to race in lr…
amsanghi 9c9e1b9
Merge pull request #2757 from OffchainLabs/fix_race_lru
Tristan-Wilson 1cb9731
Update execution/gethexec/express_lane_service.go
Tristan-Wilson fe0f243
Merge branch 'express-lane-timeboost' into express-lane-fix-sequence-…
Tristan-Wilson 1d7a645
Merge pull request #2756 from TucksonDev/express-lane-fix-sequence-nu…
Tristan-Wilson 4567b0a
Fix typo causing panic
amsanghi d20c821
Merge pull request #2763 from OffchainLabs/fix_panic
Tristan-Wilson 181932e
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson aaf051f
Post merge fixes, mostly stricter linter from 1.23
Tristan-Wilson 8b7182d
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson 7219c33
Set dep of arbitrator/langs/bf to match master
Tristan-Wilson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"reflect" | ||
"time" | ||
|
||
"github.com/ethereum/go-ethereum/node" | ||
"github.com/ethereum/go-ethereum/p2p" | ||
"github.com/ethereum/go-ethereum/rpc" | ||
"github.com/offchainlabs/nitro/cmd/conf" | ||
"github.com/offchainlabs/nitro/cmd/genericconf" | ||
"github.com/offchainlabs/nitro/timeboost" | ||
"github.com/offchainlabs/nitro/util/colors" | ||
flag "github.com/spf13/pflag" | ||
) | ||
|
||
type AutonomousAuctioneerConfig struct { | ||
AuctioneerServer timeboost.AuctioneerServerConfig `koanf:"auctioneer-server"` | ||
BidValidator timeboost.BidValidatorConfig `koanf:"bid-validator"` | ||
Persistent conf.PersistentConfig `koanf:"persistent"` | ||
Conf genericconf.ConfConfig `koanf:"conf" reload:"hot"` | ||
LogLevel string `koanf:"log-level" reload:"hot"` | ||
LogType string `koanf:"log-type" reload:"hot"` | ||
FileLogging genericconf.FileLoggingConfig `koanf:"file-logging" reload:"hot"` | ||
HTTP genericconf.HTTPConfig `koanf:"http"` | ||
WS genericconf.WSConfig `koanf:"ws"` | ||
IPC genericconf.IPCConfig `koanf:"ipc"` | ||
Metrics bool `koanf:"metrics"` | ||
MetricsServer genericconf.MetricsServerConfig `koanf:"metrics-server"` | ||
PProf bool `koanf:"pprof"` | ||
PprofCfg genericconf.PProf `koanf:"pprof-cfg"` | ||
} | ||
|
||
var HTTPConfigDefault = genericconf.HTTPConfig{ | ||
Addr: "", | ||
Port: genericconf.HTTPConfigDefault.Port, | ||
API: []string{}, | ||
RPCPrefix: genericconf.HTTPConfigDefault.RPCPrefix, | ||
CORSDomain: genericconf.HTTPConfigDefault.CORSDomain, | ||
VHosts: genericconf.HTTPConfigDefault.VHosts, | ||
ServerTimeouts: genericconf.HTTPConfigDefault.ServerTimeouts, | ||
} | ||
|
||
var WSConfigDefault = genericconf.WSConfig{ | ||
Addr: "", | ||
Port: genericconf.WSConfigDefault.Port, | ||
API: []string{}, | ||
RPCPrefix: genericconf.WSConfigDefault.RPCPrefix, | ||
Origins: genericconf.WSConfigDefault.Origins, | ||
ExposeAll: genericconf.WSConfigDefault.ExposeAll, | ||
} | ||
|
||
var IPCConfigDefault = genericconf.IPCConfig{ | ||
Path: "", | ||
} | ||
|
||
var AutonomousAuctioneerConfigDefault = AutonomousAuctioneerConfig{ | ||
Conf: genericconf.ConfConfigDefault, | ||
LogLevel: "INFO", | ||
LogType: "plaintext", | ||
HTTP: HTTPConfigDefault, | ||
WS: WSConfigDefault, | ||
IPC: IPCConfigDefault, | ||
Metrics: false, | ||
MetricsServer: genericconf.MetricsServerConfigDefault, | ||
PProf: false, | ||
Persistent: conf.PersistentConfigDefault, | ||
PprofCfg: genericconf.PProfDefault, | ||
} | ||
|
||
func AuctioneerConfigAddOptions(f *flag.FlagSet) { | ||
timeboost.AuctioneerServerConfigAddOptions("auctioneer-server", f) | ||
timeboost.BidValidatorConfigAddOptions("bid-validator", f) | ||
conf.PersistentConfigAddOptions("persistent", f) | ||
genericconf.ConfConfigAddOptions("conf", f) | ||
f.String("log-level", AutonomousAuctioneerConfigDefault.LogLevel, "log level, valid values are CRIT, ERROR, WARN, INFO, DEBUG, TRACE") | ||
f.String("log-type", AutonomousAuctioneerConfigDefault.LogType, "log type (plaintext or json)") | ||
genericconf.FileLoggingConfigAddOptions("file-logging", f) | ||
genericconf.HTTPConfigAddOptions("http", f) | ||
genericconf.WSConfigAddOptions("ws", f) | ||
genericconf.IPCConfigAddOptions("ipc", f) | ||
genericconf.AuthRPCConfigAddOptions("auth", f) | ||
f.Bool("metrics", AutonomousAuctioneerConfigDefault.Metrics, "enable metrics") | ||
genericconf.MetricsServerAddOptions("metrics-server", f) | ||
f.Bool("pprof", AutonomousAuctioneerConfigDefault.PProf, "enable pprof") | ||
genericconf.PProfAddOptions("pprof-cfg", f) | ||
} | ||
|
||
func (c *AutonomousAuctioneerConfig) ShallowClone() *AutonomousAuctioneerConfig { | ||
config := &AutonomousAuctioneerConfig{} | ||
*config = *c | ||
return config | ||
} | ||
|
||
func (c *AutonomousAuctioneerConfig) CanReload(new *AutonomousAuctioneerConfig) error { | ||
var check func(node, other reflect.Value, path string) | ||
var err error | ||
|
||
check = func(node, value reflect.Value, path string) { | ||
if node.Kind() != reflect.Struct { | ||
return | ||
} | ||
|
||
for i := 0; i < node.NumField(); i++ { | ||
fieldTy := node.Type().Field(i) | ||
if !fieldTy.IsExported() { | ||
continue | ||
} | ||
hot := fieldTy.Tag.Get("reload") == "hot" | ||
dot := path + "." + fieldTy.Name | ||
|
||
first := node.Field(i).Interface() | ||
other := value.Field(i).Interface() | ||
|
||
if !hot && !reflect.DeepEqual(first, other) { | ||
err = fmt.Errorf("illegal change to %v%v%v", colors.Red, dot, colors.Clear) | ||
} else { | ||
check(node.Field(i), value.Field(i), dot) | ||
} | ||
} | ||
} | ||
|
||
check(reflect.ValueOf(c).Elem(), reflect.ValueOf(new).Elem(), "config") | ||
return err | ||
} | ||
|
||
func (c *AutonomousAuctioneerConfig) GetReloadInterval() time.Duration { | ||
return c.Conf.ReloadInterval | ||
} | ||
|
||
func (c *AutonomousAuctioneerConfig) Validate() error { | ||
return nil | ||
} | ||
|
||
var DefaultAuctioneerStackConfig = node.Config{ | ||
DataDir: node.DefaultDataDir(), | ||
HTTPPort: node.DefaultHTTPPort, | ||
AuthAddr: node.DefaultAuthHost, | ||
AuthPort: node.DefaultAuthPort, | ||
AuthVirtualHosts: node.DefaultAuthVhosts, | ||
HTTPModules: []string{timeboost.AuctioneerNamespace}, | ||
HTTPHost: "localhost", | ||
HTTPVirtualHosts: []string{"localhost"}, | ||
HTTPTimeouts: rpc.DefaultHTTPTimeouts, | ||
WSHost: "localhost", | ||
WSPort: node.DefaultWSPort, | ||
WSModules: []string{timeboost.AuctioneerNamespace}, | ||
GraphQLVirtualHosts: []string{"localhost"}, | ||
P2P: p2p.Config{ | ||
ListenAddr: "", | ||
NoDiscovery: true, | ||
NoDial: true, | ||
}, | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the intention for this? Is it a todo or should it be removed?