Skip to content

Commit

Permalink
Merge pull request #2996 from smartcontractkit/release/0.8.5-rc0
Browse files Browse the repository at this point in the history
Release/0.8.5 rc0
  • Loading branch information
tyrion70 authored Jun 1, 2020
2 parents c6160ef + 40540b3 commit 2eaf07c
Show file tree
Hide file tree
Showing 192 changed files with 3,259 additions and 1,507 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Update cache image

on:
schedule:
# Run every day at midnight
- cron: '0 0 * * *'
# Run every Sunday at midnight
- cron: '0 0 * * 0'

repository_dispatch:
types: build-docker-cache
Expand Down
79 changes: 31 additions & 48 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
name: golang/static
on: pull_request

jobs:

vet:
name: vet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: vet
uses: grandcolline/[email protected]
with:
run: vet
comment: false

# TODO: Enable linters below one by one and fix issues with each

- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- run: go mod download
- run: go vet ./...
shadow:
name: Shadow
name: shadow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/[email protected]
with:
run: shadow
comment: false

- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- run: go get -v golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
- run: go mod download
- run: go vet -vettool=$HOME/go/bin/shadow ./...
imports:
name: Imports
name: imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- run: go get -v golang.org/x/tools/cmd/goimports
- run: d="$($HOME/go/bin/goimports -d ./)" && if [ -n "$d" ]; then echo "goimports generated output:" ; echo "$d"; exit 1; fi
staticcheck:
name: staticheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/[email protected]
with:
run: imports
comment: false

- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- run: go install honnef.co/go/tools/cmd/staticcheck
- run: $HOME/go/bin/staticcheck ./...
# TODO: Enable linters below one by one and fix issues with each
# lint:
# name: Lint
# runs-on: ubuntu-latest
Expand All @@ -48,29 +45,15 @@ jobs:
# with:
# run: lint
# comment: false

# staticcheck:
# name: StaticCheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# with:
# run: staticcheck
# comment: false

# errcheck:
# name: Errcheck
# name: errcheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# with:
# run: errcheck
# comment: false

# - uses: actions/setup-go@v2
# - uses: actions/checkout@v2
# - run: go get -u github.com/kisielk/errcheck
# # Can't get -ignorepkg to actually ignore internal... This needs more work
# - run: errcheck -ignore 'cltest:.*' -ignoretests -asserts -ignoregenerated ./... | grep -v internal
# sec:
# name: Sec
# runs-on: ubuntu-latest
Expand All @@ -81,4 +64,4 @@ jobs:
# with:
# run: sec
# flags: "-exclude=G104"
# comment: false
# comment: false
71 changes: 50 additions & 21 deletions CHANGELOG-core.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,76 @@
# Changelog Chainlink Core

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.8.4] - 2020-05-18
## [0.8.5] - 2020-06-01

### New features
### Added

Fluxmonitor initiators may now optionally include an `absoluteThreshold`
parameter. To trigger a new on-chain report, the absolute difference in the feed
value must change by at least the `absoluteThreshold` value. If it is
unspecified or zero, fluxmonitor behavior is unchanged.
- The chainlink node can now be configured to backfill logs from `n` blocks after a
connection to the ethereum client is reset. This value is specified with an environment
variable `BLOCK_BACKFILL_DEPTH`.
- The chainlink node now sets file permissions on sensitive files on startup (tls, .api, .env, .password and secret)

### Bugfixes
### Changed

Fix incorrect permissions on some files written by the node
Prevent a case where duplicate ethereum keys could be added
Improve robustness and reliability of ethtx transaction logic
- Solidity: Renamed the previous `AggregatorInterface.sol` to
`HistoricAggregatorInterface.sol`. Users are encouraged to use the new methods
introduced on the `AggregatorInterface`(`getRoundData` and `latestRoundData`),
as they return metadata to indicate freshness of the data in a single
cross-contract call.
- Solidity: Marked `HistoricAggregatorInterface` methods (`latestAnswer`,
`latestRound`, `latestTimestamp`, `getAnswer`, `getTimestamp`) as deprecated
on `FluxAggregator`, `WhitelistedAggregator`, `AggregatorProxy`,
`WhitelistedAggregatorProxy`.

### Database Migrations
### Fixed

Add created_at and updated_at to all tables allowing for better historical insights. This migration may take a minute or two on large databases.
- Fluxmonitor jobs now respect the `minPayment` field on job specs and won't poll if the contract
does not have sufficient funding. This allows certain jobs to require a larger payment
than `MINIMUM_CONTRACT_PAYMENT`.

## [0.8.3] - 2020-05-04
## [0.8.4] - 2020-05-18

### Breaking changes
### Added

New cron strings MUST now include time zone. If you want your jobs to run in UTC for example: `CRON_TZ=UTC * * * * *`. Previously, jobs specified without a time zone would run in the server's native time zone, which in most cases is UTC but this was never guaranteed.
- Fluxmonitor initiators may now optionally include an `absoluteThreshold`
parameter. To trigger a new on-chain report, the absolute difference in the feed
value must change by at least the `absoluteThreshold` value. If it is
unspecified or zero, fluxmonitor behavior is unchanged.
- Database Migrations: Add created_at and updated_at to all tables allowing for
better historical insights. This migration may take a minute or two on large
databases.

### Fixed

- Fix incorrect permissions on some files written by the node
Prevent a case where duplicate ethereum keys could be added
Improve robustness and reliability of ethtx transaction logic

## [0.8.3] - 2020-05-04

### New features
### Added

Added Changelog
- Added Changelog.
- Database Migrations: There a number of database migrations included in this
release as part of our ongoing effort to make the node even more reliable and
stable, and build a firm foundation for future development.

### Bugfixes
### Changed

Fix crash in experimental gas updater when run on Kovan network
- New cron strings MUST now include time zone. If you want your jobs to run in
UTC for example: `CRON_TZ=UTC * * * * *`. Previously, jobs specified without a
time zone would run in the server's native time zone, which in most cases is UTC
but this was never guaranteed.

### Database migrations
### Fixed

There a number of database migrations included in this release as part of our ongoing effort to make the node even more reliable and stable, and build a firm foundation for future development.
- Fix crash in experimental gas updater when run on Kovan network

## [0.8.2] - 2020-04-20

Expand Down
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ go-solidity-wrappers: ## Recompiles solidity contracts and their go wrappers
go generate ./...
go run ./packr/main.go ./core/eth/

.PHONY: testdb
testdb: ## Prepares the test database
go run ./core/main.go local db preparetest

.PHONY: docker
docker: ## Build the docker image.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.4
0.8.5
2 changes: 1 addition & 1 deletion belt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@oclif/config": "^1",
"@oclif/plugin-help": "^2",
"@oclif/plugin-not-found": "^1.2.3",
"chalk": "^3.0.0",
"chalk": "^4.0.0",
"cli-ux": "^5.4.4",
"debug": "^4.1.1",
"inquirer": "^7.0.5",
Expand Down
13 changes: 13 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
status = [
"Core Tests",
"Explorer",
"Geth Integration Tests",
"Operator UI",
"Parity Integration tests",
"Rust",
"Solidity",
"Yarn Lint",
]
block_labels = [ "do-not-merge-yet" ]
timeout_sec = 3600 # one hour
required_approvals = 1
107 changes: 50 additions & 57 deletions core/adapters/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,90 +79,83 @@ func (p PipelineAdapter) MinPayment() *assets.Link {

// For determines the adapter type to use for a given task.
func For(task models.TaskSpec, config orm.ConfigReader, orm *orm.ORM) (*PipelineAdapter, error) {
var ba BaseAdapter
var err error
mic := config.MinIncomingConfirmations()
var mp *assets.Link

ba := FindNativeAdapterFor(task)
if ba != nil { // task is for native adapter
err = unmarshalParams(task.Params, ba)
} else { // task is for external adapter
bt, err := orm.FindBridge(task.Type)
if err != nil {
return nil, fmt.Errorf("%s is not a supported adapter type", task.Type)
}
b := Bridge{BridgeType: bt, Params: task.Params}
ba = &b
mp = bt.MinimumContractPayment
mic = b.Confirmations
}

if ba == nil {
return nil, fmt.Errorf("%s is not a supported adapter type", task.Type)
}

pa := &PipelineAdapter{
BaseAdapter: ba,
minConfs: mic,
minPayment: mp,
}

return pa, err
}

// FindNativeAdapterFor find the native adapter for a given task
func FindNativeAdapterFor(task models.TaskSpec) BaseAdapter {
switch task.Type {
case TaskTypeCopy:
ba = &Copy{}
err = unmarshalParams(task.Params, ba)
return &Copy{}
case TaskTypeEthBool:
ba = &EthBool{}
err = unmarshalParams(task.Params, ba)
return &EthBool{}
case TaskTypeEthBytes32:
ba = &EthBytes32{}
err = unmarshalParams(task.Params, ba)
return &EthBytes32{}
case TaskTypeEthInt256:
ba = &EthInt256{}
err = unmarshalParams(task.Params, ba)
return &EthInt256{}
case TaskTypeEthUint256:
ba = &EthUint256{}
err = unmarshalParams(task.Params, ba)
return &EthUint256{}
case TaskTypeEthTx:
ba = &EthTx{}
err = unmarshalParams(task.Params, ba)
return &EthTx{}
case TaskTypeEthTxABIEncode:
ba = &EthTxABIEncode{}
err = unmarshalParams(task.Params, ba)
return &EthTxABIEncode{}
case TaskTypeHTTPGetWithUnrestrictedNetworkAccess:
ba = &HTTPGet{AllowUnrestrictedNetworkAccess: true}
err = unmarshalParams(task.Params, ba)
return &HTTPGet{AllowUnrestrictedNetworkAccess: true}
case TaskTypeHTTPPostWithUnrestrictedNetworkAccess:
ba = &HTTPPost{AllowUnrestrictedNetworkAccess: true}
err = unmarshalParams(task.Params, ba)
return &HTTPPost{AllowUnrestrictedNetworkAccess: true}
case TaskTypeHTTPGet:
ba = &HTTPGet{}
err = unmarshalParams(task.Params, ba)
return &HTTPGet{}
case TaskTypeHTTPPost:
ba = &HTTPPost{}
err = unmarshalParams(task.Params, ba)
return &HTTPPost{}
case TaskTypeJSONParse:
ba = &JSONParse{}
err = unmarshalParams(task.Params, ba)
return &JSONParse{}
case TaskTypeMultiply:
ba = &Multiply{}
err = unmarshalParams(task.Params, ba)
return &Multiply{}
case TaskTypeNoOp:
ba = &NoOp{}
err = unmarshalParams(task.Params, ba)
return &NoOp{}
case TaskTypeNoOpPendOutgoing:
ba = &NoOpPendOutgoing{}
err = unmarshalParams(task.Params, ba)
return &NoOpPendOutgoing{}
case TaskTypeSleep:
ba = &Sleep{}
err = unmarshalParams(task.Params, ba)
return &Sleep{}
case TaskTypeWasm:
ba = &Wasm{}
err = unmarshalParams(task.Params, ba)
return &Wasm{}
case TaskTypeRandom:
ba = &Random{}
err = unmarshalParams(task.Params, ba)
return &Random{}
case TaskTypeCompare:
ba = &Compare{}
err = unmarshalParams(task.Params, ba)
return &Compare{}
case TaskTypeQuotient:
ba = &Quotient{}
err = unmarshalParams(task.Params, ba)
return &Quotient{}
default:
bt, e := orm.FindBridge(task.Type)
if e != nil {
return nil, fmt.Errorf("%s is not a supported adapter type", task.Type)
}
b := Bridge{BridgeType: bt, Params: task.Params}
ba = &b
mp = bt.MinimumContractPayment
mic = b.Confirmations
return nil
}

pa := &PipelineAdapter{
BaseAdapter: ba,
minConfs: mic,
minPayment: mp,
}

return pa, err
}

func unmarshalParams(params models.JSON, dst interface{}) error {
Expand Down
Loading

0 comments on commit 2eaf07c

Please sign in to comment.