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

Commit

Permalink
Merge pull request #441 from 0xProject/v5.0.0-beta
Browse files Browse the repository at this point in the history
V5.0.0 beta
  • Loading branch information
fabioberger authored Oct 5, 2019
2 parents 817d631 + 2644ea7 commit 90c3d03
Show file tree
Hide file tree
Showing 63 changed files with 7,749 additions and 1,156 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- run: node --version
- run:
name: Install yarn
command: npm i -g yarn@^1.15
command: npm i -g yarn@1.17
- run:
name: Install dependencies
command: make deps-no-lockfile
Expand Down Expand Up @@ -63,4 +63,7 @@ jobs:
- run:
name: Run TS RPC client tests
command: cd rpc/clients/typescript && yarn test
- run:
name: Run cut-release script to test it still works
command: VERSION=100.0.0 make cut-release

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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.

## v5.0.0-beta

### Breaking changes 🛠

- Removes the `txHashes` key in the `OrderEvent`s emitted from the `orders` JSON-RPC subscription and replaced it with `contractEvents`, an array of decoded order-relevant contract events. Parsing these events allows callers to find every discrete order fill/cancel event. ([#420](https://github.com/0xProject/0x-mesh/pull/420))
- Renames the `Kind` key in `OrderEvent` to `EndState` to better elucidate that it represents the aggregate change to the orders state since it was last re-validated. As an end state, it does not capture any possible intermediate states the order might have been in since the last re-validation. Intermediate states can be inferred from the `contractEvents` included ([#420](https://github.com/0xProject/0x-mesh/pull/420))

### Features ✅

- Removed the max expiration limit for orders. The only remaining expiration constraint is that the unix timestamp does not overflow int64 (i.e., is not larger than 9223372036854775807). ([#400](https://github.com/0xProject/0x-mesh/pull/400))

### Bug fixes 🐞

- Fixed bug where we weren't updating an orders `fillableTakerAssetAmount` in the DB when orders were being partially filled or when their fillability increased due to a block re-org. ([#439](https://github.com/0xProject/0x-mesh/pull/439))
- Made `verbosity` field optional in the TypeScript `Config` type. ([#410](https://github.com/0xProject/0x-mesh/pull/410))
- Fixed issue where we weren't re-validating orders potentially impacted by the balance increase of the recipient of an ERC20 or ERC721 transfer. ([#416](https://github.com/0xProject/0x-mesh/pull/416))

## v4.0.1-beta

### Bug fixes 🐞
Expand Down
76 changes: 57 additions & 19 deletions docs/development.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,34 @@
[![Version](https://img.shields.io/badge/version-4.0.1--beta-orange.svg)](https://github.com/0xProject/0x-mesh/releases)

# 0x Mesh Development Guide

Welcome to the [0x Mesh](https://github.com/0xProject/0x-mesh) Development
Guide! This guide will help you get started with contributing to the 0x Mesh
codebase.
# 0x Mesh Development and Contribution Guide

## Directory Location

If you are working on 0x-mesh, the root directory for the project must be at
**\$GOPATH/src/github.com/0xProject/0x-mesh**. 0x Mesh uses [Dep](https://golang.github.io/dep/docs/installation.html) for dependency
**\$GOPATH/src/github.com/0xProject/0x-mesh**. 0x Mesh uses
[Dep](https://golang.github.io/dep/docs/installation.html) for dependency
management and does not support Go modules.

## Cloning the Repository and Opening PRs

0x Mesh uses two main branches:

1. The `development` branch contains the latest (possibly unreleased) changes
and is not guaranteed to be stable.
2. The `master` branch contains the latest stable release.

If you intend to fork 0x Mesh and open a PR, you should work off of the
`development` branch. Make sure you check out the `development` branch and pull
the latest changes.

```
git checkout development
git pull
```

All PRs should use `development` as the base branch. When opening a new PR, use
the dropdown menu in the GitHub UI to select `development`.

![Selecting a branch](https://user-images.githubusercontent.com/800857/64901012-00272480-d64a-11e9-86f7-a2450ba8d0d9.png)

## Prerequisites

- [GNU Make](https://www.gnu.org/software/make/) If you are using a Unix-like OS, you probably already have this.
Expand Down Expand Up @@ -39,25 +56,26 @@ docker pull 0xorg/ganache-cli
docker run -ti -p 8545:8545 -e VERSION=4.3.0 0xorg/ganache-cli
```

Run tests in a vanilla Go environment:
There are various Make targets for running tests:

```
```bash
# Run tests in pure Go
make test-go
```

Run tests in a Node.js/WebAssembly environment:

```
make test-wasm
```
# Compile to WebAssembly and run tests in Node.js
make test-wasm-node

Run tests in both environments:
# Compile to WebAssembly and run tests in a headless Chrome browser
make test-wasm-browser

```
# Run tests in all available environments
make test-all
```

## Running the linter
## Running the Linters

0x Mesh is configured to use linters for both Go and TypeScript code. To run all
available linters, run:

```
make lint
Expand Down Expand Up @@ -86,3 +104,23 @@ For VS Code, the following editor configuration is recommended:
// ...
}
```

When working on code with the build tag `js,wasm`, you might need to add the
following to your editor config:

```javascript
{
// ...

"go.toolsEnvVars": {
"GOARCH": "wasm",
"GOOS": "js"
},
"go.testEnvVars": {
"GOARCH": "wasm",
"GOOS": "js"
}

// ...
}
```
37 changes: 34 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ deps-js:
yarn install


# gobin allows us to install specific versions of binary tools written in Go.
.PHONY: gobin
gobin:
GO111MODULE=off go get -u github.com/myitcv/gobin


# wasmbrowsertest is required for running WebAssembly tests in the browser.
.PHONY: wasmbrowsertest
wasmbrowsertest:
go get -u github.com/agnivade/wasmbrowsertest
wasmbrowsertest: gobin
gobin github.com/agnivade/wasmbrowsertest@v0.3.0


# Installs dependencies without updating Gopkg.lock or yarn.lock
Expand All @@ -38,9 +44,16 @@ test-all: test-go test-wasm-node test-wasm-browser


.PHONY: test-go
test-go:
test-go: test-go-parallel test-go-serial

.PHONY: test-go-parallel
test-go-parallel:
go test ./... -race -timeout 30s

.PHONY: test-go-serial
test-go-serial:
go test ./ethereum ./zeroex/ordervalidator ./zeroex/orderwatch -race -timeout 30s -p=1 --serial


.PHONY: test-integration
test-integration:
Expand Down Expand Up @@ -89,3 +102,21 @@ cut-release:

.PHONY: all
all: mesh mesh-keygen mesh-bootstrap db-integrity-check


# Docker images


.PHONY: docker-mesh
docker-mesh:
docker build . -t 0xorg/mesh -f ./dockerfiles/mesh/Dockerfile


.PHONY: docker-mesh-bootstrap
docker-mesh-bootstrap:
docker build . -t 0xorg/mesh-bootstrap -f ./dockerfiles/mesh-bootstrap/Dockerfile


.PHONY: docker-mesh-fluent-bit
docker-mesh-fluent-bit:
docker build ./dockerfiles/mesh-fluent-bit -t 0xorg/mesh-fluent-bit -f ./dockerfiles/mesh-fluent-bit/Dockerfile
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-4.0.1--beta-orange.svg)](https://github.com/0xProject/0x-mesh/releases)
[![Version](https://img.shields.io/badge/version-5.0.0--beta-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
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0x/mesh-browser",
"version": "4.0.1-beta",
"version": "5.0.0-beta",
"description": "TypeScript and JavaScript bindings for running Mesh directly in the browser.",
"main": "./lib/index.js",
"license": "Apache-2.0",
Expand Down
Loading

0 comments on commit 90c3d03

Please sign in to comment.