Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_: Code Migration from status-cli-tests #5990

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
14dcd29
test_: Code Migration from status-cli-tests
shashankshampi Oct 24, 2024
5de833a
test_: Code Migration from status-cli-tests with develop rebase
shashankshampi Oct 30, 2024
c08e922
fix(ci)_: skip windows build cleanup stage
mendelskiv93 Oct 28, 2024
5b37466
test_: Code Migration from status-cli-tests with review comments
shashankshampi Oct 30, 2024
c8256c2
test_: Code Migration from status-cli-tests with cleanup
shashankshampi Oct 30, 2024
92ff5bf
test_: Code Migration from status-cli-tests with cleanup
shashankshampi Oct 30, 2024
38c1d12
test_: Code Migration from status-cli-tests cleanup
shashankshampi Oct 30, 2024
5d4838a
chore_: remove detection of external swaps and bridges
dlipicar Oct 11, 2024
7617bdd
ci_: configure test jobs (#6008)
igor-sirotin Oct 31, 2024
928daec
test_: Code Migration from status-cli-tests cleanup
shashankshampi Oct 31, 2024
1827420
test_: Code Migration from status-cli-tests addressing review comments
shashankshampi Oct 31, 2024
c4bb706
feat(addAmountOutInSentTransactions)_: Add amount out in NewRouterSen…
Khushboo-dev-cpp Oct 28, 2024
89104b3
fix(wallet)_: properly use amount in erc1155 transfers
dlipicar Oct 30, 2024
c040cc7
chore(wallet)_: router tx improvements (#6020)
saledjenic Oct 31, 2024
670f17a
test_: Code Migration from status-cli-tests review addressing
shashankshampi Nov 2, 2024
26adbea
test_: Code Migration from status-cli-tests logger removal
shashankshampi Nov 2, 2024
33606e8
test_: Code Migration from status-cli-tests logger removal
shashankshampi Nov 2, 2024
e938635
chore_: get version with go generate (#6014)
igor-sirotin Nov 3, 2024
66d612c
test_: Code Migration from status-cli-tests for 1 on 1 message (#6022)
shashankshampi Nov 3, 2024
b329b15
fix_: bridge tx improvements
saledjenic Oct 29, 2024
9ecaa2a
test_: profile tests
churik Nov 6, 2024
d15ec57
fix_: move version to separate package (#6053)
igor-sirotin Nov 6, 2024
f15c64c
chore_: add sentry-go dependency (#6052)
igor-sirotin Nov 6, 2024
cfcef92
feat(wallet)_: store route execution data to db
dlipicar Oct 16, 2024
414e08b
chore_: rework transaction code to make it more reusable
dlipicar Nov 7, 2024
1940d26
chore_: adapt route db to new transaction code
dlipicar Nov 7, 2024
4fc9361
fix(wallet)_: broken swap and bridge for erc20 tokens fixed
saledjenic Nov 7, 2024
bcef2d6
test_: Code Migration from status-cli-tests
shashankshampi Oct 24, 2024
ce3ff64
test_: Code Migration from status-cli-tests with review comments
shashankshampi Oct 30, 2024
4e2fd8f
test_: Code Migration from status-cli-tests with cleanup
shashankshampi Oct 30, 2024
4a663a0
test_: Code Migration from status-cli-tests with cleanup
shashankshampi Oct 30, 2024
9fa435a
test_: Code Migration from status-cli-tests cleanup
shashankshampi Oct 30, 2024
2c38568
test_: Code Migration from status-cli-tests cleanup
shashankshampi Oct 31, 2024
dafa903
test_: Code Migration from status-cli-tests addressing review comments
shashankshampi Oct 31, 2024
942a59e
test_: Code Migration from status-cli-tests review addressing
shashankshampi Nov 2, 2024
91e9a86
test_: Code Migration from status-cli-tests logger removal
shashankshampi Nov 2, 2024
8c1d6b1
test_: Code Migration from status-cli-tests logger removal
shashankshampi Nov 2, 2024
386a772
test_: Code Migration from status-cli-tests for 1 on 1 message (#6022)
shashankshampi Nov 3, 2024
31b0a0d
fix: cleanup PR 1
fbarbu15 Nov 9, 2024
be1cc0d
Merge remote-tracking branch 'origin/cli_test_migration' into cli_tes…
fbarbu15 Nov 9, 2024
184b887
Revert "Merge remote-tracking branch 'origin/cli_test_migration' into…
fbarbu15 Nov 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ __pycache__/
report/results.xml
tests-functional/coverage
tests-functional/reports
tests-functional/local
tests-functional/status-backend
tests-functional/*.log

# generated files
Expand All @@ -120,6 +122,8 @@ bindata.go
migrations.go
cmd/status-backend/server/endpoints.go
protocol/messenger_handlers.go
internal/version/VERSION
internal/version/GIT_COMMIT

# Don't ignore generated files in the vendor/ directory
!vendor/**/*.pb.go
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ help: ##@other Show this help
RELEASE_TAG ?= $(shell ./_assets/scripts/version.sh)
RELEASE_DIR ?= /tmp/release-$(RELEASE_TAG)
GOLANGCI_BINARY = golangci-lint
IPFS_GATEWAY_URL ?= https://ipfs.status.im/

ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
detected_OS := Windows
Expand Down Expand Up @@ -61,14 +60,8 @@ GIT_AUTHOR ?= $(shell git config user.email || echo $$USER)
ENABLE_METRICS ?= true
BUILD_TAGS ?= gowaku_no_rln

BUILD_FLAGS ?= -ldflags="-X github.com/status-im/status-go/params.Version=$(RELEASE_TAG:v%=%) \
-X github.com/status-im/status-go/params.GitCommit=$(GIT_COMMIT) \
-X github.com/status-im/status-go/params.IpfsGatewayURL=$(IPFS_GATEWAY_URL) \
-X github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/metrics.EnabledStr=$(ENABLE_METRICS)"

BUILD_FLAGS_MOBILE ?= -ldflags="-X github.com/status-im/status-go/params.Version=$(RELEASE_TAG:v%=%) \
-X github.com/status-im/status-go/params.GitCommit=$(GIT_COMMIT) \
-X github.com/status-im/status-go/params.IpfsGatewayURL=$(IPFS_GATEWAY_URL)"
BUILD_FLAGS ?= -ldflags="-X github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/metrics.EnabledStr=$(ENABLE_METRICS)"
BUILD_FLAGS_MOBILE ?=

networkid ?= StatusChain

Expand Down
2 changes: 1 addition & 1 deletion _assets/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM golang:1.21-alpine3.18 as builder
ENV CC=clang
ENV CXX=clang++

RUN apk add --no-cache git make llvm clang musl-dev linux-headers protobuf-dev~3.21
RUN apk add --no-cache git bash make llvm clang musl-dev linux-headers protobuf-dev~3.21

ARG build_tags
ARG build_flags
Expand Down
4 changes: 2 additions & 2 deletions _assets/ci/Jenkinsfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pipeline {
)
booleanParam(
name: 'UNIT_TEST_RERUN_FAILS',
defaultValue: isPRJob(),
defaultValue: !isNightlyJob(),
description: 'Should the job rerun failed tests?'
)
booleanParam(
Expand Down Expand Up @@ -56,7 +56,7 @@ pipeline {
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: getAmountToKeep(),
daysToKeepStr: '30',
daysToKeepStr: '-1',
artifactNumToKeepStr: getAmountToKeep(),
))
}
Expand Down
10 changes: 7 additions & 3 deletions _assets/ci/Jenkinsfile.tests-rpc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ pipeline {
disableConcurrentBuilds()
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '5',
daysToKeepStr: '30',
artifactNumToKeepStr: '1',
numToKeepStr: getAmountToKeep(),
daysToKeepStr: '-1',
artifactNumToKeepStr: getAmountToKeep(),
))
}

Expand Down Expand Up @@ -74,3 +74,7 @@ pipeline {
cleanup { sh 'make git-clean' }
} // post
} // pipeline

def isDevelopJob() { env.JOB_BASE_NAME == 'tests-rpc-develop' }

def getAmountToKeep() { isDevelopJob() ? '30' : '5' }
5 changes: 3 additions & 2 deletions api/geth_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/images"
"github.com/status-im/status-go/internal/version"
"github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/multiaccounts"
"github.com/status-im/status-go/multiaccounts/accounts"
Expand Down Expand Up @@ -2062,10 +2063,10 @@ func (b *GethStatusBackend) loadNodeConfig(inputNodeCfg *params.NodeConfig) erro

// Start WakuV1 if WakuV2 is not enabled
conf.WakuConfig.Enabled = !conf.WakuV2Config.Enabled
// NodeConfig.Version should be taken from params.Version
// NodeConfig.Version should be taken from version.Version
// which is set at the compile time.
// What's cached is usually outdated so we overwrite it here.
conf.Version = params.Version
conf.Version = version.Version()
conf.RootDataDir = b.rootDataDir
conf.DataDir = filepath.Join(b.rootDataDir, conf.DataDir)
conf.KeyStoreDir = filepath.Join(b.rootDataDir, conf.KeyStoreDir)
Expand Down
7 changes: 6 additions & 1 deletion cmd/status-backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/ethereum/go-ethereum/log"

"github.com/status-im/status-go/cmd/status-backend/server"
"github.com/status-im/status-go/internal/version"
"github.com/status-im/status-go/logutils"
)

Expand Down Expand Up @@ -42,7 +43,11 @@ func main() {
return
}

log.Info("server started", "address", srv.Address())
log.Info("status-backend started",
"address", srv.Address(),
"version", version.Version(),
"gitCommit", version.GitCommit(),
)
srv.RegisterMobileAPI()
srv.Serve()
}
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ require github.com/fogleman/gg v1.3.0
require (
github.com/Masterminds/squirrel v1.5.4
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/andybalholm/brotli v1.0.5
github.com/andybalholm/brotli v1.1.0
github.com/bits-and-blooms/bloom/v3 v3.7.0
github.com/cenkalti/backoff/v4 v4.2.1
github.com/getsentry/sentry-go v0.29.1
github.com/gorilla/sessions v1.2.1
github.com/gorilla/websocket v1.5.3
github.com/ipfs/go-log/v2 v2.5.1
Expand Down Expand Up @@ -201,9 +202,9 @@ require (
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/miekg/dns v1.1.62 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
Expand Down
21 changes: 16 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ github.com/anacrolix/utp v0.0.0-20180219060659-9e0e1d1d0572/go.mod h1:MDwc+vsGEq
github.com/anacrolix/utp v0.1.0 h1:FOpQOmIwYsnENnz7tAGohA+r6iXpRjrq8ssKSre2Cp4=
github.com/anacrolix/utp v0.1.0/go.mod h1:MDwc+vsGEq7RMw6lr2GKOEqjWny5hO5OZXRVNaBJ2Dk=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/andybalholm/cascadia v1.2.0 h1:vuRCkM5Ozh/BfmsaTm26kbjm0mIOM3yS5Ek/F5h18aE=
github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxBp0T0eFw1RUQY=
Expand Down Expand Up @@ -800,6 +800,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x
github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
github.com/getsentry/sentry-go v0.29.1 h1:DyZuChN8Hz3ARxGVV8ePaNXh1dQ7d76AiB117xcREwA=
github.com/getsentry/sentry-go v0.29.1/go.mod h1:x3AtIzN01d6SiWkderzaH28Tm0lgkafpJ5Bm3li39O0=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
Expand All @@ -812,6 +814,8 @@ github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e/go.mod h1:Ogl1T
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g=
github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks=
github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY=
Expand Down Expand Up @@ -1418,8 +1422,9 @@ github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcncea
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E=
Expand All @@ -1433,13 +1438,15 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
Expand Down Expand Up @@ -1692,6 +1699,8 @@ github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pion/datachannel v1.4.21/go.mod h1:oiNyP4gHx2DIwRzX/MFyH0Rz/Gz05OgBlayAI2hAWjg=
github.com/pion/datachannel v1.5.2/go.mod h1:FTGQWaHrdCwIJ1rw6xBIfZVkslikjShim5yr05XFuCQ=
github.com/pion/datachannel v1.5.8 h1:ph1P1NsGkazkjrvyMfhRBUAWMxugJjq2HfQifaOoSNo=
Expand Down Expand Up @@ -1984,8 +1993,9 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v0.0.0-20190215210624-980c5ac6f3ac h1:wbW+Bybf9pXxnCFAOWZTqkRjAc7rAIwo2e1ArUhiHxg=
github.com/smartystreets/assertions v0.0.0-20190215210624-980c5ac6f3ac/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
Expand Down Expand Up @@ -2699,6 +2709,7 @@ golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
3 changes: 3 additions & 0 deletions internal/sentry/sentry.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package sentry

import _ "github.com/getsentry/sentry-go"
36 changes: 36 additions & 0 deletions internal/version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package version

import (
_ "embed"
"strings"
)

// Use go:generate script to get the version and git commit.
// VERSION and GIT_COMMIT files are used in further `go:embed` commands to load values to the variables.
// Suppress errors, assuming files have already been properly generated. Required for Docker builds.
//go:generate sh -c "../../_assets/scripts/version.sh > VERSION || true"
//go:generate sh -c "git rev-parse --short HEAD > GIT_COMMIT || true"

var (
// version is defined in git tags.
// We set it from the Makefile.
//go:embed VERSION
version string

// gitCommit is a commit hash.
//go:embed GIT_COMMIT
gitCommit string
)

func init() {
version = strings.TrimSpace(version)
gitCommit = strings.TrimSpace(gitCommit)
}

func Version() string {
return version
}

func GitCommit() string {
return gitCommit
}
1 change: 0 additions & 1 deletion node/status_node_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ func (b *StatusNode) walletService(accountsDB *accounts.Database, appDB *sql.DB,
b.walletSrvc = wallet.NewService(
b.walletDB, accountsDB, appDB, b.rpcClient, accountsFeed, settingsFeed, b.gethAccountManager, b.transactor, b.config,
b.ensService(b.timeSourceNow()),
b.stickersService(accountsDB),
b.pendingTracker,
walletFeed,
b.httpServer,
Expand Down
2 changes: 1 addition & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ func NewNodeConfig(dataDir string, networkID uint64) (*NodeConfig, error) {
DataDir: dataDir,
KeyStoreDir: keyStoreDir,
KeycardPairingDataFile: keycardPairingDataFile,
Version: Version,
Version: version.Version(),
HTTPHost: "localhost",
HTTPPort: 8545,
HTTPVirtualHosts: []string{"localhost"},
Expand Down
3 changes: 3 additions & 0 deletions params/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ const (

// LESDiscoveryIdentifier is a prefix for topic used for LES peers discovery.
LESDiscoveryIdentifier = "LES2@"

// IpfsGatewayURL is the Gateway URL to use for IPFS
IpfsGatewayURL = "https://ipfs.status.im/"
)

var (
Expand Down
11 changes: 0 additions & 11 deletions params/version.go

This file was deleted.

12 changes: 6 additions & 6 deletions rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ var (

var (
// rpcUserAgentName the user agent
rpcUserAgentName = fmt.Sprintf(rpcUserAgentFormat, "no-GOOS", params.Version)
rpcUserAgentUpstreamName = fmt.Sprintf(rpcUserAgentUpstreamFormat, "no-GOOS", params.Version)
rpcUserAgentName = fmt.Sprintf(rpcUserAgentFormat, "no-GOOS", version.Version())
rpcUserAgentUpstreamName = fmt.Sprintf(rpcUserAgentUpstreamFormat, "no-GOOS", version.Version())
)

func init() {
if appCommon.IsMobilePlatform() {
rpcUserAgentName = fmt.Sprintf(rpcUserAgentFormat, mobile, params.Version)
rpcUserAgentUpstreamName = fmt.Sprintf(rpcUserAgentUpstreamFormat, mobile, params.Version)
rpcUserAgentName = fmt.Sprintf(rpcUserAgentFormat, mobile, version.Version())
rpcUserAgentUpstreamName = fmt.Sprintf(rpcUserAgentUpstreamFormat, mobile, version.Version())
} else {
rpcUserAgentName = fmt.Sprintf(rpcUserAgentFormat, desktop, params.Version)
rpcUserAgentUpstreamName = fmt.Sprintf(rpcUserAgentUpstreamFormat, desktop, params.Version)
rpcUserAgentName = fmt.Sprintf(rpcUserAgentFormat, desktop, version.Version())
rpcUserAgentUpstreamName = fmt.Sprintf(rpcUserAgentUpstreamFormat, desktop, version.Version())
}
}

Expand Down
5 changes: 3 additions & 2 deletions rpc/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"math/big"
"net/http"
"net/http/httptest"
"strings"
"sync"
"testing"

Expand Down Expand Up @@ -184,6 +185,6 @@ func TestGetClientsUsingCache(t *testing.T) {
}

func TestUserAgent(t *testing.T) {
require.Equal(t, "procuratee-desktop/", rpcUserAgentName)
require.Equal(t, "procuratee-desktop-upstream/", rpcUserAgentUpstreamName)
require.True(t, strings.HasPrefix(rpcUserAgentName, "procuratee-desktop/"))
require.True(t, strings.HasPrefix(rpcUserAgentUpstreamName, "procuratee-desktop-upstream/"))
}
2 changes: 1 addition & 1 deletion services/ext/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (s *Service) InitProtocol(nodeName string, identity *ecdsa.PrivateKey, appD
s.n,
s.config.ShhextConfig.InstallationID,
s.peerStore,
params.Version,
version.Version(),
options...,
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion services/wallet/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func TestAPI_GetAddressDetails(t *testing.T) {
chainClient.SetWalletNotifier(func(chainID uint64, message string) {})
c.SetWalletNotifier(func(chainID uint64, message string) {})

service := NewService(db, accountsDb, appDB, c, accountFeed, nil, nil, nil, &params.NodeConfig{}, nil, nil, nil, nil, nil, "")
service := NewService(db, accountsDb, appDB, c, accountFeed, nil, nil, nil, &params.NodeConfig{}, nil, nil, nil, nil, "")

api := &API{
s: service,
Expand Down
4 changes: 4 additions & 0 deletions services/wallet/common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func ZeroBigIntValue() *big.Int {
return big.NewInt(0)
}

func ZeroHash() ethCommon.Hash {
return ethCommon.Hash{}
}

func (c ChainID) String() string {
return strconv.FormatUint(uint64(c), 10)
}
Expand Down
Loading
Loading