Skip to content

Commit

Permalink
Merge pull request #201 from smartcontractkit/develop
Browse files Browse the repository at this point in the history
Release v0.1.5 (contracts version) #2
  • Loading branch information
krebernisak authored Mar 9, 2022
2 parents 97f5b57 + c36a496 commit 43f3aa5
Show file tree
Hide file tree
Showing 154 changed files with 5,530 additions and 1,156 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/chaos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ jobs:
run: go mod download
- name: Install Ginkgo CLI
run: |
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.0.0
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.0.0
go get github.com/onsi/ginkgo/v2/ginkgo/labels@v2.0.0
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.1.2
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.1.2
go get github.com/onsi/ginkgo/v2/ginkgo/labels@v2.1.2
go install github.com/onsi/ginkgo/v2/ginkgo
- uses: actions/download-artifact@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:
type: string
cl_repo:
required: true
default: 795953128386.dkr.ecr.us-west-2.amazonaws.com/chainlink
default: public.ecr.aws/z0b1w9r9/chainlink
type: string
cl_image:
required: true
default: develop.latest
default: develop
type: string
secrets:
QA_AWS_ACCESS_KEY_ID:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.direnv
.vscode
.idea
target/
artifacts/bin/
tarpaulin-report.html
Expand All @@ -10,11 +11,14 @@ node_modules
dist
.env
flow-report.json
report.json
.envrc
bin

# test
packages-ts/gauntlet-terra-contracts/codeIds/test*
packages-ts/gauntlet-terra-contracts/networks/.env.test*
tests/e2e/logs
networks/.env.test*
packages-ts/gauntlet-terra-contracts/networks/.env.test*
tests/e2e/smoke/rdd/directory*
tests/e2e/smoke/reports
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodejs 14.19.0
golang 1.17.6
golang 1.17.7
rust 1.58.1
36 changes: 19 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

members = [
"contracts/*",
"crates/*"
"crates/*",
"examples/hello-world",
]

[profile.dev]
Expand Down
23 changes: 18 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ download:
go mod download

install:
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.0.0
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.0.0
go get github.com/onsi/ginkgo/v2/ginkgo/labels@v2.0.0
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.1.2
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.1.2
go get github.com/onsi/ginkgo/v2/ginkgo/labels@v2.1.2
go install github.com/onsi/ginkgo/v2/ginkgo

build_js:
Expand Down Expand Up @@ -45,11 +45,24 @@ artifacts_clean_terrad:

build: build_js build_contracts

test_relay_unit:
go build -v ./pkg/terra/...
go test -v ./pkg/terra/...

test_smoke:
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo -p -procs=2 tests/e2e/smoke
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo -p -procs=3 tests/e2e/smoke

test_ocr:
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo --focus=@ocr tests/e2e/smoke
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo --focus=@ocr2 tests/e2e/smoke

test_ocr_proxy:
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo --focus=@ocr_proxy tests/e2e/smoke

test_migration:
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo tests/e2e/migration

test_gauntlet:
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo --focus=@gauntlet tests/e2e/smoke

test_chaos:
SELECTED_NETWORKS=localterra NETWORK_SETTINGS=$(shell pwd)/tests/e2e/networks.yaml ginkgo tests/e2e/chaos
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Chainlink Terra Integration
# Chainlink Terra

This repository is a monorepo of the various components required for Chainlink on Terra.
## Quick Start

- Terra Contracts (OCR2, ...)
- Terra CL Relay
- Terra Gauntlet
- Terra On-chain Monitoring
- Ops (infrastructure)
- Integration (tests)
- Demos & Examples

# Local asdf initial setup

asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
# for other golang requirements for your os go to https://github.com/kennyp/asdf-golang
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin-add rust https://github.com/asdf-community/asdf-rust.git

# Then run
asdf install
For more information, see the [Chainlink Terra Documentation](./docs/).
25 changes: 21 additions & 4 deletions cmd/monitoring/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
func main() {
ctx := context.Background()

log := logger.NewLogger().With("project", "terra")
coreLog := logger.NewLogger()
log := logWrapper{coreLog}

terraConfig, err := monitoring.ParseTerraConfig()
if err != nil {
Expand All @@ -24,15 +25,16 @@ func main() {
terraConfig.ChainID,
terraConfig.TendermintURL,
terraConfig.ReadTimeout,
log,
coreLog,
)
if err != nil {
log.Fatalw("failed to create a terra client", "error", err)
return
}
chainReader := monitoring.NewChainReader(client)

envelopeSourceFactory := monitoring.NewEnvelopeSourceFactory(
client,
chainReader,
log.With("component", "source-envelope"),
)
txResultsFactory := monitoring.NewTxResultsSourceFactory(
Expand All @@ -41,7 +43,7 @@ func main() {

entrypoint, err := relayMonitoring.NewEntrypoint(
ctx,
logWrapper{log},
log,
terraConfig,
envelopeSourceFactory,
txResultsFactory,
Expand All @@ -52,6 +54,21 @@ func main() {
return
}

proxySourceFactory := monitoring.NewProxySourceFactory(
chainReader,
log.With("component", "source-proxy"),
)
if entrypoint.Config.Feature.TestOnlyFakeReaders {
proxySourceFactory = monitoring.NewFakeProxySourceFactory(log.With("component", "fake-proxy-source"))
}
entrypoint.SourceFactories = append(entrypoint.SourceFactories, proxySourceFactory)

prometheusExporterFactory := monitoring.NewPrometheusExporterFactory(
log.With("component", "terra-prometheus-exporter"),
monitoring.NewMetrics(log.With("component", "terra-metrics")),
)
entrypoint.ExporterFactories = append(entrypoint.ExporterFactories, prometheusExporterFactory)

entrypoint.Run()
log.Info("monitor stopped")
}
Expand Down
Loading

0 comments on commit 43f3aa5

Please sign in to comment.