-
Notifications
You must be signed in to change notification settings - Fork 475
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
317
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.
+8,880
−337
Open
Changes from 185 commits
Commits
Show all changes
317 commits
Select commit
Hold shift + click to select a range
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 72de9d2
Add timeboosted field to broadcast feed
ganeshvanahalli fa457b1
Fix autonomous-auctioner cli startup
Tristan-Wilson 97f7c18
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
ganeshvanahalli 1781ae3
change timeboosted byte array calculation
ganeshvanahalli a713900
address PR comments
ganeshvanahalli 811fd19
define IsTxTimeboosted on the BlockMetadata type
ganeshvanahalli b67b08b
only write blockMetadata to db when its non-nil, prevents erasing of …
ganeshvanahalli 0ff4f7d
Start rpc stack after creating bid validator
Tristan-Wilson b8890a1
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 7a2eb14
Plumbing to be able to start timeboost in nitro
Tristan-Wilson 572d4b2
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 5fda4c4
use arbostypes.BlockMetadata return type instead of []byte for BlockM…
ganeshvanahalli 0d3d83d
Publish Timeboost BlockMetadata to Sequencer Coordinator's redis
ganeshvanahalli d72fd38
Fix various linter and compilation issues
Tristan-Wilson a5b3eea
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 2cd1ed0
Fix cyclic dependency in test
Tristan-Wilson 13a9e0e
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 9a85c95
Merge branch 'add-timeboosted-broadcastfeedmessage' into publish-bloc…
ganeshvanahalli f4efcd9
Move where timeboost is started to avoid circ dep
Tristan-Wilson d3cd8f5
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 651277d
Temp fix for timeboost startup race cond, fix NPE
Tristan-Wilson a19acb6
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 31ea7be
Retry initial call on express lane contract
Tristan-Wilson 0aa68ef
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 3835dff
Persist Auctioneer Bid DB to S3
ganeshvanahalli 03fa6a4
complete plumbing
ganeshvanahalli d1890da
Add bidder-client exe for timeboost deposits/bids
Tristan-Wilson bf8adc5
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 81ab68b
handle empty bids case
ganeshvanahalli 8200213
Enable reading of bids from large sql database in chunks to avoid OOMing
ganeshvanahalli 15ba495
Merge branch 'express-lane-timeboost' into persist-auctioneerbids-s3
ganeshvanahalli 103b395
Clear bidsPerSenderInRound when auction closes
Tristan-Wilson d60de53
Timeboost Bulk Metadata API
ganeshvanahalli 712b3ad
validate BlockMetadataApiCacheSize
ganeshvanahalli ee5bfd6
Merge branch 'express-lane-timeboost' into bulk-blockmetadata-api
ganeshvanahalli 86ee92b
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
ganeshvanahalli 3bb87ee
Merge branch 'add-timeboosted-broadcastfeedmessage' into bulk-blockme…
ganeshvanahalli 3431e2c
Use FilterSystem for ContractFilterer in ELS
Tristan-Wilson 952cd37
move BlockMetadataAtCount into ConsensusInfo
ganeshvanahalli cad5b12
Fix SequenceNumber attribute and decode order
TucksonDev 857823c
update arb_getRawBlockMetadata to accept rpc.BlockNumber inputs inste…
ganeshvanahalli 851d2bd
protect BulkBlockMetadataFetcher's cache with mutex
ganeshvanahalli 4c07677
Enable caching of blockMetadata by default and clear cache when reorg…
ganeshvanahalli 2148c35
address PR comments
ganeshvanahalli 4da2511
Merge branch 'add-timeboosted-broadcastfeedmessage' into publish-bloc…
ganeshvanahalli b6ea4f5
Fix panic when transferring express lane controller due to race in lr…
amsanghi 18cddc5
address PR comments
ganeshvanahalli d64ce27
Adapter for ContractFilterer
Tristan-Wilson 4383d52
small fix
ganeshvanahalli 9c9e1b9
Merge pull request #2757 from OffchainLabs/fix_race_lru
Tristan-Wilson bbab516
Add a boolean field to tx receipt object indicating if the tx was tim…
ganeshvanahalli 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 0ae3c89
Merge remote-tracking branch 'origin/express-lane-timeboost' into exp…
Tristan-Wilson d299eea
Remove timeboost sequencer url config opt
Tristan-Wilson 4567b0a
Fix typo causing panic
amsanghi d20c821
Merge pull request #2763 from OffchainLabs/fix_panic
Tristan-Wilson 1ad12ca
Fix timeboost auction resolution queue handling
Tristan-Wilson 181932e
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson 2c1e0e5
Bulk sync missing blockMetadata
ganeshvanahalli aaf051f
Post merge fixes, mostly stricter linter from 1.23
Tristan-Wilson f653c95
Allow wider range of RoundTimingInfo + validation
Tristan-Wilson 47ff5ee
Fix auction closed test
Tristan-Wilson f8e8aa9
Fix max bids OBOE
Tristan-Wilson 71c8c84
Bind AuthPort to random number to avoid collision
Tristan-Wilson 06dc0ab
Fix OBOE in validator in a better way, fix test
Tristan-Wilson c4f4316
delete affected missing blockMetadata trackers from ArbDB in case of …
ganeshvanahalli 4722102
add plumbing to allow starting BlockMetadataRebuilder
ganeshvanahalli df96876
test bulk syncing of missing blockMetadata
ganeshvanahalli 87af748
address PR comments
ganeshvanahalli c0acac1
rename reorgEventsReader to reorgEventsNotifier
ganeshvanahalli 8b7182d
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson 31c950f
Merge branch 'express-lane-timeboost' into express-lane-timeboost-inp…
Tristan-Wilson d8137ec
minor bug fixes and improvements
ganeshvanahalli 7219c33
Set dep of arbitrator/langs/bf to match master
Tristan-Wilson 75acee8
Merge branch 'express-lane-timeboost' into express-lane-timeboost-inp…
Tristan-Wilson fa93c2c
Forgot to commit RoundTimingInfo validation
Tristan-Wilson 7f9e5b6
Reorder express lane tx validation
Tristan-Wilson feaf306
address PR comments
ganeshvanahalli dfe0c51
address PR comments
ganeshvanahalli b031d13
Merge branch 'bulk-blockmetadata-api' into bulksyncing-missing-blockm…
ganeshvanahalli 41d7436
merge express-lane-timeboost and resolve conflicts
ganeshvanahalli b7d1b06
Rename delay param to isExpressLaneController
Tristan-Wilson 436f831
Use ptr to sequencer instead of member fn for ES
Tristan-Wilson b991d76
Change log level for future EL sequence number
Tristan-Wilson bab0157
address PR comments
ganeshvanahalli a5f248d
make flag description clearer
ganeshvanahalli f5ca4bf
Use interface instead of ptr to seq for tests
Tristan-Wilson a8a6369
Add early timeboost submission grace period
Tristan-Wilson 3c491aa
update geth pin
ganeshvanahalli 23869a2
Fix reversed boolean condition
Tristan-Wilson 71f9c5a
address PR comments
ganeshvanahalli b865417
address PR comments and track last delete failure from sqlDB to preve…
ganeshvanahalli 7dfe40d
Merge remote-tracking branch 'origin/express-lane-timeboost' into exp…
Tristan-Wilson b13c89a
Merge pull request #2762 from OffchainLabs/express-lane-timeboost-rem…
Tristan-Wilson a812410
Merge branch 'express-lane-timeboost' into express-lane-timeboost-fix…
Tristan-Wilson 6933b94
Merge pull request #2764 from OffchainLabs/express-lane-timeboost-fix…
Tristan-Wilson 287f74a
Merge pull request #2775 from OffchainLabs/express-lane-timeboost-inp…
Tristan-Wilson 066ff17
Merge remote-tracking branch 'origin/express-lane-timeboost' into exp…
Tristan-Wilson dc65eef
Merge remote-tracking branch 'origin/expres-lane-timeboost-fix-pr-com…
Tristan-Wilson 969dc1d
Refactor stubPublisher
Tristan-Wilson 5a02894
Change transactionPublisher interface
Tristan-Wilson 5e450cd
Merge remote-tracking branch 'origin/expres-lane-timeboost-fix-pr-com…
Tristan-Wilson 2bea5ca
Loop for round check
Tristan-Wilson cc75bf2
Remove uncessary locking
Tristan-Wilson 9bf924f
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson 7356aaf
Automatic import cleanup
Tristan-Wilson 3b67813
Merge branch 'express-lane-timeboost' into expres-lane-timeboost-fix-…
Tristan-Wilson cee611d
Merge pull request #2787 from OffchainLabs/expres-lane-timeboost-fix-…
Tristan-Wilson bc93214
address PR comments
ganeshvanahalli 06b94b0
merge upstream and resolve conflicts
ganeshvanahalli 0178eb7
clear blockMetadata if there's a mismatch between feed's blockhash an…
ganeshvanahalli fbbc94e
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson bcabeaa
Fix race condition around checking current round
Tristan-Wilson 4c295c5
Use EIP712 signing scheme for bids
Tristan-Wilson dab4225
Fix bug where bid counts weren't reset
Tristan-Wilson 06ea35b
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson 5f52169
Merge branch 'express-lane-timeboost-early-submission-grace' into exp…
Tristan-Wilson 0d607f7
Fix duplicated case, better name for ticker
Tristan-Wilson bb1dc9f
Fix timeboost round control transfer
Tristan-Wilson 8175908
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson 45ca632
Merge branch 'express-lane-timeboost-early-submission-grace' into exp…
Tristan-Wilson 4863402
auctioneer should close the ackNotifier after setting the result
ganeshvanahalli c2b85d2
Move currentTime into loop
Tristan-Wilson 6b8fd67
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ear…
Tristan-Wilson e1344f7
Merge pull request #2788 from OffchainLabs/express-lane-timeboost-ear…
Tristan-Wilson 45773a3
Merge branch 'express-lane-timeboost' into express-lane-timeboost-eip…
Tristan-Wilson cb71840
Merge pull request #2808 from OffchainLabs/express-lane-timeboost-eip…
Tristan-Wilson 5e408da
Fix round control transfer to same check
Tristan-Wilson e64520f
Timeboost-test: Express lane control transfer
ganeshvanahalli a90a817
Include bidder addr in bid validator errors
Tristan-Wilson dea14a5
make timeboost testing structure more modular
ganeshvanahalli 0d8c195
wait for controller change on sequencer side
ganeshvanahalli 7780636
Merge branch 'express-lane-timeboost' into test-expresslanecontrol-tr…
ganeshvanahalli e857141
merge upstream and resolve conflicts
ganeshvanahalli 0d23279
merge upstream
ganeshvanahalli e1798b4
use ticker to allow for timely posting of bids to s3
ganeshvanahalli 89c0f53
Include seq number in EL submission error
Tristan-Wilson 1799f2c
update batch name to firstRound-lastRound to improve ux and allow for…
ganeshvanahalli 929a5e9
fix typo
ganeshvanahalli 5cd6169
Merge branch 'express-lane-timeboost' into persist-auctioneerbids-s3
ganeshvanahalli c9a42e2
Refactor RoundTimingInfo, fix auctionCloseTicker
Tristan-Wilson 3f3aba0
Merge branch 'express-lane-timeboost' into express-lane-timeboost-ref…
Tristan-Wilson bbc703a
Merge pull request #2841 from OffchainLabs/express-lane-timeboost-ref…
Tristan-Wilson a998a41
merge upstream
ganeshvanahalli 2e80697
Merge pull request #2833 from OffchainLabs/test-expresslanecontrol-tr…
ganeshvanahalli 63ba4d4
Update timeboost/roundtiminginfo.go
Tristan-Wilson a719c5c
Fix processing of transactions in expressLaneService
ganeshvanahalli 9967120
fix lint errors
ganeshvanahalli 72fb72a
fix race in expresslaneservice_test file
ganeshvanahalli a449e92
add a system test to test transaction handling
ganeshvanahalli 1837035
fix race in TestBidValidatorAuctioneerRedisStream
ganeshvanahalli 1f73102
fix CI lint and race errors
ganeshvanahalli 8016d82
merge master
ganeshvanahalli 8eeb797
Merge branch 'express-lane-timeboost' into persist-auctioneerbids-s3
ganeshvanahalli 7e47ce2
address PR comments
ganeshvanahalli e9fc4a7
merge upstream and resolve conflicts
ganeshvanahalli d87c63c
fix lint error
ganeshvanahalli 910a375
address PR comments
ganeshvanahalli 6843fce
merge upstream and resolve conflicts
ganeshvanahalli 68388dd
check that timed out express-lane tx returns an error
ganeshvanahalli 0199caf
fix CI error
ganeshvanahalli 8cacbb2
Merge remote-tracking branch 'origin/master' into express-lane-timeboost
Tristan-Wilson 54be46a
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Tristan-Wilson 77df3c7
fix stubPublisher in express_lane_service_test.go
ganeshvanahalli e4da075
Merge pull request #2745 from OffchainLabs/persist-auctioneerbids-s3
Tristan-Wilson 6b99351
Merge pull request #2695 from OffchainLabs/add-timeboosted-broadcastf…
Tristan-Wilson a319bb5
Merge pull request #2735 from OffchainLabs/publish-blockmetadata-seqc…
Tristan-Wilson 9955576
merge upstream
ganeshvanahalli 704c61a
merge upstream
ganeshvanahalli a77252f
fix lint errors
ganeshvanahalli 1155dea
merge upstream
ganeshvanahalli 558e0fb
merge upstream
ganeshvanahalli 411b1cd
fix lint errors
ganeshvanahalli 067b687
fix minor issues with config
ganeshvanahalli 8d759a9
add required default flag to --dev and nitro testnode
ganeshvanahalli f140a1d
enable checking for BlockHashMismatchLogMsg in the test logs
ganeshvanahalli e775ef2
test that express lane control switch happens seamlessly in extreme c…
ganeshvanahalli e18f1a2
Merge branch 'express-lane-timeboost' into fix-expresslaneservice-txp…
ganeshvanahalli f17852c
address PR comments
ganeshvanahalli 925bb74
Merge pull request #2754 from OffchainLabs/bulk-blockmetadata-api
Tristan-Wilson d79ffde
Merge pull request #2760 from OffchainLabs/include-timeboosted-receip…
Tristan-Wilson 1d7f045
merge upstream
ganeshvanahalli f1f1198
resolve conflicts
ganeshvanahalli a9bbd0b
Merge pull request #2765 from OffchainLabs/bulksyncing-missing-blockm…
ganeshvanahalli 3b96d19
merge upstream
ganeshvanahalli 2ac7fea
Merge pull request #2850 from OffchainLabs/fix-expresslaneservice-txp…
ganeshvanahalli 090abb7
update geth pin
ganeshvanahalli 9cb8dbb
update seq_filter_test
ganeshvanahalli d624150
fix blockhash mismatch issue in tests
ganeshvanahalli 717364f
Improve timeboost implementation
ganeshvanahalli cf6b606
remove unused field
ganeshvanahalli 6d8f406
solve race in expressLaneService
ganeshvanahalli d48436d
fix filterLogs params for auction contract. Avoid fetching same log t…
ganeshvanahalli b1aefc7
merge upstream
ganeshvanahalli 44a393e
reduce some more race
ganeshvanahalli 0c325f7
set zero blockMetadata when sequencing delayedMsgs and prevent markin…
ganeshvanahalli 10414fe
Merge branch 'express-lane-timeboost' into improve-timeboost-code
ganeshvanahalli 7df81a4
address PR comments and add max-queued-tx-count config option to limi…
ganeshvanahalli c9b61ce
Merge branch 'master' into express-lane-timeboost
ganeshvanahalli 3a1f91c
Merge branch 'express-lane-timeboost' into improve-timeboost-code
ganeshvanahalli be11793
Merge pull request #2860 from OffchainLabs/improve-timeboost-code
Tristan-Wilson 9920c6a
directly use result chan in sequencing of timeboosted txs, handle con…
ganeshvanahalli 3b3ebeb
improve handling of contexts in PublishTransaction and PublishTimeboo…
ganeshvanahalli a1fc664
merge master and update geth pin
ganeshvanahalli 4bddb79
Merge branch 'master' into express-lane-timeboost
ganeshvanahalli 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" | ||
|
||
flag "github.com/spf13/pflag" | ||
|
||
"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" | ||
) | ||
|
||
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) | ||
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?