Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
release: 11.0.3 (#1054)
Browse files Browse the repository at this point in the history
* fix database clean up for v4 orders

* add multiple external sources to grab public IP by mesh

- add an optional configuration for custom public ip sources
- update docs

* cut release
  • Loading branch information
opaolini authored Mar 29, 2021
1 parent ee90a94 commit a3a7d73
Show file tree
Hide file tree
Showing 21 changed files with 758 additions and 687 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Version](https://img.shields.io/badge/version-11.0.2-orange.svg)](https://github.com/0xProject/0x-mesh/releases)
[![Version](https://img.shields.io/badge/version-11.0.3-orange.svg)](https://github.com/0xProject/0x-mesh/releases)
[![Docs](https://img.shields.io/badge/docs-website-yellow.svg)](https://0x-org.gitbook.io/mesh)
[![Chat with us on Discord](https://img.shields.io/badge/chat-Discord-blueViolet.svg)](https://discord.gg/HF7fHwk)
[![Circle CI](https://img.shields.io/circleci/project/0xProject/0x-mesh/master.svg)](https://circleci.com/gh/0xProject/0x-mesh/tree/master)
Expand Down
36 changes: 22 additions & 14 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const (
estimatedNonPollingEthereumRPCRequestsPer24Hrs = 50000
// logStatsInterval is how often to log stats for this node.
logStatsInterval = 5 * time.Minute
version = "11.0.2"
version = "11.0.3"
// ordersyncMinPeers is the minimum amount of peers to receive orders from
// before considering the ordersync process finished.
ordersyncMinPeers = 5
Expand Down Expand Up @@ -194,6 +194,13 @@ type Config struct {
// MaxBytesPerSecond is the maximum number of bytes per second that a peer is
// allowed to send before failing the bandwidth check. Defaults to 5 MiB.
MaxBytesPerSecond float64 `envvar:"MAX_BYTES_PER_SECOND" default:"5242880"`
// AdditionalPublicIPSources is a list of external public IP source like
// https://whatismyip.api.0x.org/ which return the IP address in a
// text/plain format. This list is prepended to the default sources list.
//
// It expects a comma delimited list of external sources for example:
// ADDITIONAL_PUBLIC_IP_SOURCES="https://ifconfig.me/ip,http://192.168.5.10:1337/ip"
AdditionalPublicIPSources string `envvar:"ADDITIONAL_PUBLIC_IP_SOURCES" default:""`
}

type App struct {
Expand Down Expand Up @@ -614,19 +621,20 @@ func (app *App) Start() error {
return err
}
nodeConfig := p2p.Config{
SubscribeTopic: app.orderFilter.Topic(),
PublishTopics: publishTopics,
TCPPort: app.config.P2PTCPPort,
WebSocketsPort: app.config.P2PWebSocketsPort,
Insecure: false,
PrivateKey: app.privKey,
MessageHandler: app,
RendezvousPoints: rendezvousPoints,
UseBootstrapList: app.config.UseBootstrapList,
BootstrapList: bootstrapList,
DB: app.db,
CustomMessageValidator: app.orderFilter.ValidatePubSubMessage,
MaxBytesPerSecond: app.config.MaxBytesPerSecond,
SubscribeTopic: app.orderFilter.Topic(),
PublishTopics: publishTopics,
TCPPort: app.config.P2PTCPPort,
WebSocketsPort: app.config.P2PWebSocketsPort,
Insecure: false,
PrivateKey: app.privKey,
MessageHandler: app,
RendezvousPoints: rendezvousPoints,
UseBootstrapList: app.config.UseBootstrapList,
BootstrapList: bootstrapList,
DB: app.db,
CustomMessageValidator: app.orderFilter.ValidatePubSubMessage,
MaxBytesPerSecond: app.config.MaxBytesPerSecond,
AdditionalPublicIPSources: strings.Split(app.config.AdditionalPublicIPSources, ","),
}
app.node, err = p2p.New(innerCtx, nodeConfig)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion docs/browser-bindings/browser-lite/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @0x/mesh-browser-lite - v11.0.2
# @0x/mesh-browser-lite - v11.0.3

## @0x/mesh-browser-lite

Expand Down
Loading

0 comments on commit a3a7d73

Please sign in to comment.