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

Commit 1a4a775

Browse files
authored
Merge pull request #720 from 0xProject/release/9.0.1
Release version 9.0.1
2 parents ccec0f3 + f10e11e commit 1a4a775

17 files changed

+809
-630
lines changed

.drone.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ steps:
9595
api_key:
9696
from_secret: github_public_repo
9797
files:
98-
- /
98+
- *
9999
note: RELEASE_CHANGELOG.md
100100
when:
101101
event: tag

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This changelog is a work in progress and may contain notes for versions which have not actually been released. Check the [Releases](https://github.com/0xProject/0x-mesh/releases) page to see full release notes and more information about the latest released versions.
44

5+
## v9.0.1
6+
7+
### Bug fixes 🐞
8+
9+
- Fix bug where we weren't enforcing that we never store more than `miniHeaderRetentionLimit` block headers in the DB. This caused [issue #667](https://github.com/0xProject/0x-mesh/issues/667) and also caused the Mesh node's DB storage to continuously grow over time. ([#716](https://github.com/0xProject/0x-mesh/pull/716))
10+
511
## v9.0.0
612

713
### Breaking changes 🛠

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Version](https://img.shields.io/badge/version-9.0.0-orange.svg)](https://github.com/0xProject/0x-mesh/releases)
1+
[![Version](https://img.shields.io/badge/version-9.0.1-orange.svg)](https://github.com/0xProject/0x-mesh/releases)
22
[![Docs](https://img.shields.io/badge/docs-website-yellow.svg)](https://0x-org.gitbook.io/mesh)
33
[![Chat with us on Discord](https://img.shields.io/badge/chat-Discord-blueViolet.svg)](https://discord.gg/HF7fHwk)
44
[![Circle CI](https://img.shields.io/circleci/project/0xProject/0x-mesh/master.svg)](https://circleci.com/gh/0xProject/0x-mesh/tree/master)

RELEASE_CHANGELOG.md

+2-17
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
- [Docker image](https://hub.docker.com/r/0xorg/mesh/tags)
2-
- [README](https://github.com/0xProject/0x-mesh/blob/v9.0.0/README.md)
2+
- [README](https://github.com/0xProject/0x-mesh/blob/v9.0.1/README.md)
33

44
## Summary
55

6-
### Breaking changes 🛠
7-
8-
- As a result of implementing custom order filters, some of the code Mesh uses under the hood to share orders with peers has changed. As a result this version of Mesh cannot share orders with any older versions and vice versa ([#630](https://github.com/0xProject/0x-mesh/pull/630)).
9-
- Implemented a new protocol for sharing existing orders with peers. This will drastically reduce bandwidth and CPU usage and increase the speed at which _new_ orders are propagated. ([#692](https://github.com/0xProject/0x-mesh/pull/692)).
10-
- Rename `RPC_ADDR` to `WS_RPC_ADDR` since we now support both WS and HTTP JSON-RPC endpoints. ([#658](https://github.com/0xProject/0x-mesh/pull/658))
11-
12-
### Features ✅
13-
14-
- Implemented custom order filters, which allow users to filter out all but the orders they care about. When a custom order filter is specified, Mesh will only send and receive orders that pass the filter. ([#630](https://github.com/0xProject/0x-mesh/pull/630)).
15-
- Developers can now override the contract addresses for any testnet using the `CUSTOM_CONTRACT_ADDRESSES` env config ([#640](https://github.com/0xProject/0x-mesh/pull/640)).
16-
- Added `getOrdersForPageAsync` method to `@0x/mesh-rpc-client` WS client interface so that clients can paginate through the retrieved orders themselves ([#642](https://github.com/0xProject/0x-mesh/pull/642)).
17-
- Added support for passing in your own Web3 provider when using the `@0x/mesh-browser` package. ([#665](https://github.com/0xProject/0x-mesh/pull/665)).
18-
- Add support for orders involving Chai ERC20Bridge assetData ([#663](https://github.com/0xProject/0x-mesh/pull/663))
19-
- Add support for calling JSON-RPC methods over HTTP (env config `HTTP_RPC_ADDR` defaults to `localhost:60556`). ([#658](https://github.com/0xProject/0x-mesh/pull/658))
20-
216
### Bug fixes 🐞
227

23-
- Fixed some of the browser typescript bindings to be consistent with the Go and smart contract implementations ([#697](https://github.com/0xProject/0x-mesh/pull/697)).
8+
- Fix bug where we weren't enforcing that we never store more than `miniHeaderRetentionLimit` block headers in the DB. This caused [issue #667](https://github.com/0xProject/0x-mesh/issues/667) and also caused the Mesh node's DB storage to continuously grow over time. ([#716](https://github.com/0xProject/0x-mesh/pull/716))
249

2510

browser/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@0x/mesh-browser",
3-
"version": "9.0.0",
3+
"version": "9.0.1",
44
"description": "TypeScript and JavaScript bindings for running Mesh directly in the browser.",
55
"main": "./lib/index.js",
66
"license": "Apache-2.0",

core/core.go

+16-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import (
4747
)
4848

4949
const (
50-
blockWatcherRetentionLimit = 20
5150
ethereumRPCRequestTimeout = 30 * time.Second
5251
peerConnectTimeout = 60 * time.Second
5352
checkNewAddrInterval = 20 * time.Second
@@ -61,7 +60,7 @@ const (
6160
estimatedNonPollingEthereumRPCRequestsPer24Hrs = 50000
6261
// logStatsInterval is how often to log stats for this node.
6362
logStatsInterval = 5 * time.Minute
64-
version = "9.0.0"
63+
version = "9.0.1"
6564
// ordersyncMinPeers is the minimum amount of peers to receive orders from
6665
// before considering the ordersync process finished.
6766
ordersyncMinPeers = 5
@@ -307,12 +306,26 @@ func New(config Config) (*App, error) {
307306
if err != nil {
308307
return nil, err
309308
}
309+
310+
// Remove any old mini headers that might be lingering in the database.
311+
// See https://github.com/0xProject/0x-mesh/issues/667 and https://github.com/0xProject/0x-mesh/pull/716
312+
// We need to leave this in place becuase:
313+
//
314+
// 1. It is still necessary for anyone upgrading from older versions to >= 9.0.1 in the future.
315+
// 2. There's still a chance there are old MiniHeaders in the database (e.g. due to a sudden
316+
// unexpected shut down).
317+
//
318+
err = meshDB.PruneMiniHeadersAboveRetentionLimit()
319+
if err != nil {
320+
return nil, err
321+
}
322+
310323
topics := orderwatch.GetRelevantTopics()
311324
miniHeaders, err := meshDB.FindAllMiniHeadersSortedByNumber()
312325
if err != nil {
313326
return nil, err
314327
}
315-
stack := simplestack.New(blockWatcherRetentionLimit, miniHeaders)
328+
stack := simplestack.New(meshDB.MiniHeaderRetentionLimit, miniHeaders)
316329
blockWatcherConfig := blockwatch.Config{
317330
Stack: stack,
318331
PollingInterval: config.BlockPollingInterval,

0 commit comments

Comments
 (0)