Skip to content

Commit

Permalink
Merge branch 'develop' into feat/contract-v2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Aug 1, 2024
2 parents 37b09fa + aed7caa commit 0c3e5ff
Show file tree
Hide file tree
Showing 46 changed files with 1,868 additions and 292 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ on:
- release/*
merge_group:
pull_request:
branches:
- "*"
types:
- synchronize
- opened
- reopened

concurrency:
group: pr-testing-${{ github.head_ref || github.run_id }}
Expand All @@ -28,8 +22,6 @@ jobs:
build-and-test:
runs-on: ubuntu-20.04
timeout-minutes: 15
concurrency:
group: "build-and-test"
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
- develop
- release/*
pull_request:
branches:
- "*"
merge_group:
schedule:
# run at 6AM UTC Daily
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/sast-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- "*"
merge_group:
pull_request:
types:
- opened
- synchronize

concurrency:
group: linters-${{ github.head_ref || github.run_id }}
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile-localnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.7-labs
FROM golang:1.22.5-bookworm AS base-build
# syntax=ghcr.io/zeta-chain/docker-dockerfile:1.7-labs
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm AS base-build

ENV GOPATH /go
ENV GOOS=linux
Expand All @@ -22,10 +22,10 @@ COPY --exclude=*.sh --exclude=*.md --exclude=*.yml . .
RUN --mount=type=cache,target="/root/.cache/go-build" make install
RUN --mount=type=cache,target="/root/.cache/go-build" make install-zetae2e

FROM golang:1.22.5-bookworm AS cosmovisor-build
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm AS cosmovisor-build
RUN go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]

FROM golang:1.22.5-bookworm AS base-runtime
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm AS base-runtime

RUN apt update && \
apt install -yq jq yq curl tmux python3 openssh-server iputils-ping iproute2 bind9-host && \
Expand All @@ -46,6 +46,7 @@ ENV PATH /root/.zetacored/cosmovisor/current/bin/:/root/.zetaclientd/upgrades/cu
COPY contrib/localnet/scripts /root
COPY contrib/localnet/ssh_config /etc/ssh/ssh_config.d/localnet.conf
COPY contrib/localnet/zetacored /root/zetacored
COPY contrib/localnet/preparams /root/static-preparams
COPY cmd/zetae2e/config/localnet.yml /root/config.yml

RUN chmod 755 /root/*.sh && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ start-e2e-admin-test: zetanode
start-e2e-performance-test: zetanode
@echo "--> Starting e2e performance test"
export E2E_ARGS="--test-performance" && \
cd contrib/localnet/ && $(DOCKER_COMPOSE) -f docker-compose.yml up -d
cd contrib/localnet/ && $(DOCKER_COMPOSE) --profile stress -f docker-compose.yml up -d

start-e2e-import-mainnet-test: zetanode
@echo "--> Starting e2e import-data test"
Expand Down
8 changes: 7 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

## Unreleased

### Features

* [2578](https://github.com/zeta-chain/node/pull/2578) - Add Gateway address in protocol contract list

## v19.0.0

### Breaking Changes

* [2460](https://github.com/zeta-chain/node/pull/2460) - Upgrade to go 1.22. This required us to temporarily remove the QUIC backend from [go-libp2p](https://github.com/libp2p/go-libp2p). If you are a zetaclient operator and have configured quic peers, you need to switch to tcp peers.
* [List of the other breaking changes can be found in this document](docs/releases/v19_breaking_changes.md)

### Features

Expand Down Expand Up @@ -38,6 +43,7 @@
* [2518](https://github.com/zeta-chain/node/pull/2518) - add support for Solana address in zetacore
* [2483](https://github.com/zeta-chain/node/pull/2483) - add priorityFee (gasTipCap) gas to the state
* [2567](https://github.com/zeta-chain/node/pull/2567) - add sign latency metric to zetaclient (zetaclient_sign_latency)
* [2524](https://github.com/zeta-chain/node/pull/2524) - add inscription envolop parsing

### Refactor

Expand Down Expand Up @@ -584,4 +590,4 @@ Getting the correct TSS address for Bitcoin now requires proviidng the Bitcoin c
### CI

* [1218](https://github.com/zeta-chain/node/pull/1218) - cross-compile release binaries and simplify PR testings
* [1302](https://github.com/zeta-chain/node/pull/1302) - add mainnet builds to goreleaser
* [1302](https://github.com/zeta-chain/node/pull/1302) - add mainnet builds to goreleaser
11 changes: 5 additions & 6 deletions cmd/zetae2e/config/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ func getClientsFromConfig(ctx context.Context, conf config.Config, account confi
E2EClients,
error,
) {
if conf.RPCs.Solana == "" {
return E2EClients{}, fmt.Errorf("solana rpc is empty")
}
solanaClient := rpc.New(conf.RPCs.Solana)
if solanaClient == nil {
return E2EClients{}, fmt.Errorf("failed to get solana client")
var solanaClient *rpc.Client
if conf.RPCs.Solana != "" {
if solanaClient = rpc.New(conf.RPCs.Solana); solanaClient == nil {
return E2EClients{}, fmt.Errorf("failed to get solana client")
}
}
btcRPCClient, err := getBtcClient(conf.RPCs.Bitcoin)
if err != nil {
Expand Down
11 changes: 6 additions & 5 deletions cmd/zetae2e/config/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ default_account:
evm_address: "0xE5C5367B8224807Ac2207d350E60e1b6F27a7ecC"
private_key: "d87baf7bf6dc560a252596678c12e41f7d1682837f05b29d411bc3f78ae2c263"
rpcs:
zevm: "http://0.0.0.0:9545"
evm: "http://0.0.0.0:8545"
zevm: "http://localhost:9545"
evm: "http://localhost:8545"
bitcoin:
host: "0.0.0.0:18443"
host: "localhost:18443"
user: "smoketest"
pass: "123"
http_post_mode: true
disable_tls: true
params: regnet
zetacore_grpc: "0.0.0.0:9090"
zetacore_rpc: "http://0.0.0.0:26657"
zetacore_grpc: "localhost:9090"
zetacore_rpc: "http://localhost:26657"
solana: "http://solana:8899"
contracts:
zevm:
system_contract: "0x91d18e54DAf4F677cB28167158d6dd21F6aB3921"
Expand Down
4 changes: 4 additions & 0 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
eg.Go(miscTestRoutine(conf, deployerRunner, verbose, e2etests.TestMyTestName))
}
if testSolana {
if deployerRunner.SolanaClient == nil {
logger.Print("❌ solana client is nil, maybe solana rpc is not set")
os.Exit(1)
}
eg.Go(solanaTestRoutine(conf, deployerRunner, verbose, e2etests.TestSolanaDepositName))
}
if testV2 {
Expand Down
7 changes: 7 additions & 0 deletions cmd/zetae2e/local/performance.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ func ethereumWithdrawPerformanceRoutine(
return err
}

if r.ReceiptTimeout == 0 {
r.ReceiptTimeout = 15 * time.Minute
}
if r.CctxTimeout == 0 {
r.CctxTimeout = 15 * time.Minute
}

r.Logger.Print("🏃 starting Ethereum withdraw performance tests")
startTime := time.Now()

Expand Down
4 changes: 4 additions & 0 deletions cmd/zetae2e/local/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func initTestRunner(
return nil, err
}

// copy timeouts from deployer runner
testRunner.CctxTimeout = deployerRunner.ReceiptTimeout
testRunner.ReceiptTimeout = deployerRunner.ReceiptTimeout

// copy contracts from deployer runner
if err := testRunner.CopyAddressesFrom(deployerRunner); err != nil {
return nil, err
Expand Down
6 changes: 4 additions & 2 deletions contrib/localnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# - An orchestrator to manage interaction with the localnet (orchestrator)
# - An upgrade host to serve binaries for the upgrade tests (upgrade-host). Only enabled when profile is set to upgrade.
# - An upgrade orchestrator to send the upgrade governance proposal (upgrade-orchestrator). Only enabled when profile is set to upgrade.
#
# If you are using third party images in CI, you should copy them into ghcr via https://github.com/zeta-chain/copy-docker-images

networks:
mynetwork:
Expand Down Expand Up @@ -181,7 +183,7 @@ services:
- preparams:/root/preparams

eth:
image: ethereum/client-go:v1.10.26
image: ghcr.io/zeta-chain/ethereum-client-go:v1.10.26
container_name: eth
hostname: eth
ports:
Expand All @@ -207,7 +209,7 @@ services:
ipv4_address: 172.20.0.102

bitcoin:
image: ruimarinho/bitcoin-core:22 # version 23 is not working with btcd 0.22.0 due to change in createwallet rpc
image: ghcr.io/zeta-chain/ruimarinho-bitcoin-core:22 # version 23 is not working with btcd 0.22.0 due to change in createwallet rpc
container_name: bitcoin
hostname: bitcoin
networks:
Expand Down
4 changes: 2 additions & 2 deletions contrib/localnet/orchestrator/Dockerfile.fastbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM zetanode:latest as zeta
FROM ethereum/client-go:v1.10.26 as geth
FROM golang:1.20.14-bookworm as orchestrator
FROM ghcr.io/zeta-chain/ethereum-client-go:v1.10.26 as geth
FROM ghcr.io/zeta-chain/golang:1.22.5-bookworm as orchestrator

RUN apt update && \
apt install -yq jq yq curl tmux python3 openssh-server iputils-ping iproute2 && \
Expand Down
1 change: 1 addition & 0 deletions contrib/localnet/preparams/zetaclient0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"PaillierSK":{"N":19999163952130747960789760351783788437756051987951355569970036401244501934315272438705577988944467922102492970155408252851533852794097112218266886553586076347804115557757017279985449126837870194546917950194158856088817869376589018796114667864086028598566847973861695589083004303196605694312963960967331453606698750471421102641235873021677307589731091486775521460999458082171513731685071918681293270385071153104334613903503586831444874346531652054016464538970392294909014876824634633871501554184148693655829401315639013286485392467863637678737554558389111485917683916225530045382764297294039119124600051351150814211249,"LambdaN":9999581976065373980394880175891894218878025993975677784985018200622250967157636219352788994472233961051246485077704126425766926397048556109133443276793038173902057778878508639992724563418935097273458975097079428044408934688294509398057333932043014299283423986930847794541502151598302847156481980483665726803207844439805564908826908299383131049732286281017413122919529611290634931314211468373848862938241694978602167585393762136625122435580962508878486729843009777923588471302593033407043805894076580681612304239013813560948585228383852537633607722118782082256871296347729191161115127804109535019576521175406883452282,"PhiN":19999163952130747960789760351783788437756051987951355569970036401244501934315272438705577988944467922102492970155408252851533852794097112218266886553586076347804115557757017279985449126837870194546917950194158856088817869376589018796114667864086028598566847973861695589083004303196605694312963960967331453606415688879611129817653816598766262099464572562034826245839059222581269862628422936747697725876483389957204335170787524273250244871161925017756973459686019555847176942605186066814087611788153161363224608478027627121897170456767705075267215444237564164513742592695458382322230255608219070039153042350813766904564},"NTildei":27751913785731317561401314588152253217728532341018033146570952349857948266439815804220817588815467446516307716665513549241775208783937988610417256936545867146994706743041371293345131680171448151086694170309671283486292778243426639412725044938992517873701725006330137070569134489394538234586796972674797327961558527707455425675762370744764931280145514019295136133284528084915871623701598565821330577968131284073671734400158797160800982150954634593880871530904229027402996176777363730066986245815341196905861357768072141609870245229405943812356754513322852513347434681734563805660510650984453048567481135942146732097813,"H1i":27561956258855841139395484606566450906572976054374340673395795572404700162978995778059515299485228139352425772962548084873215102616280128304708426026182349406021553685331715999823302504724574932475811252902805356309567749243825500782237349965272997278195732138043060594209278009387869413139123717258217760369558773026393837335151469655513584729163915760124835545159150578571574024242102852384898501031964398164508802427280019310461284676702762930983763592670681066746406519089087470866348555388978893174745329039290345402036056193885195412683078301439714912339014313158992229100758385774991450029591789628252080327559,"H2i":3728689158497086873141839685259803753136983319082693856963169726229733672131113136177490814524417255268612620467671366860707614533735757821359190975354246119660178366078082228715114521844446138293061922109534401626012196214235577165710689292018952534202208597250579673907469566293203565367500274532873330046549157395771416744602137701132458921345439713375591947533341059776041205066197520027367159385233699483111938755605800865028185017605864002287172205806900860500164647247828301974000635262077178937664668984154402040254899639546189675216600248280397892382489630326684820331235755629614367050680421011963919488203,"Alpha":12023422531214934687129519427336751009035984170561091401995316889932876861127740921311384022403289655727852687123651207179666808127441651093217171624401095992093222930319273470697036100721360499771918420525219595960686726656705243231703751035078246024613303037202379961560592763983837502239948740870420991159486603826605562036000339449263579950064527369636354957917745420111193837730149039024242588057472210146671375468285242828724250764829561800066210708917523476384078739610379308948169897901580561000198663019628193284829226489567395610248716149143318042255879731755585576865932443849122426445714440683236201534278,"Beta":5216977155731439778993461291447860640876449566364806008925260703987381460229691893122780873808995223223163744678138135687392695130955126431701144250850716493320323144762645954407840190267536639011747593827794567732053411766358287215370001772078774800656600220349293422391251849464836894526916992757090542649120892603149475768335549307299570724464502418555347605473575788163359985939167794314377636554352661162839551390523751777303683251484579852979700993668013952132183651009302732527581967714766865349243790338837470546064122938436752503268419712265039843732584942630907069295257952472051299690267622482814099402925,"P":88381187817350292364427405327147330703367287364982016684112982632296448146824918798880619726847439553397534386831375002209019191421648634648182506013318106307619159619988111117766095040541079223450318951393068166232842380382197780515682551401156068869281037660390394768227141311012971150741063274439667450459,"Q":78500624598652662628885184600358941803683076507070394222241292020467077683298789581328374906370256776628646773897006681776229150698724417192594456702517705509422164083826765704615434585654776671817770799114758241307176860136745886869834508666912875775642490370066102181451552981996440342363450244264823933513}
1 change: 1 addition & 0 deletions contrib/localnet/preparams/zetaclient1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"PaillierSK":{"N":25457323703460371644373827851778353435908685545536291211414305927928082101422802375380956856518622585962127533562602337812505686541014270487215858975042050235822544248116017505877597933410473464293488133847473268207855779565258437349543414395202677572215574814178481625691319056806051001296935063337564959613946853301319882243101806634616304952340762437957311109361139537003343727266144726020980226387527399976767399929714573852847006597083854380782298222809663705175454809775894834259259463209475055228451410224743854216982482304542678812902450978087467239914333938758325149969031218172033710990345090457725286155369,"LambdaN":12728661851730185822186913925889176717954342772768145605707152963964041050711401187690478428259311292981063766781301168906252843270507135243607929487521025117911272124058008752938798966705236732146744066923736634103927889782629218674771707197601338786107787407089240812845659528403025500648467531668782479806813742728801761583826250346152597916461665330341417210865403249207688068024511779741700862572325893119988056196796737754342005501326839164137901466935886175203187779468543295518513474790300431685405399522582870280178201647350255071127607420848021324546760642117122537154772656918409371952846795161211096663722,"PhiN":25457323703460371644373827851778353435908685545536291211414305927928082101422802375380956856518622585962127533562602337812505686541014270487215858975042050235822544248116017505877597933410473464293488133847473268207855779565258437349543414395202677572215574814178481625691319056806051001296935063337564959613627485457603523167652500692305195832923330660682834421730806498415376136049023559483401725144651786239976112393593475508684011002653678328275802933871772350406375558937086591037026949580600863370810799045165740560356403294700510142255214841696042649093521284234245074309545313836818743905693590322422193327444},"NTildei":31003307508440219158999589043691487475214403045663899026562678761033723312134301775994380397340895347768030057673125775357231348422303424896353372086256383810227518020752599051565951084967114983497141943098598166478211002761519017923016106288584503911326974632855330677820271330604647920436680600523891654973049735964884221470375561066575855880397950409200861685776119732740086942459996794425002691495469612824702455527096404118964381427191733411202093448946116508668456394085348340248206727068840446659229676204271387087603945932130347573000387228525030313172082417029388909317895370107946248250389259192939259646373,"H1i":29730781813111470699934807288606362535555403609772197456284708278048318668560878554383640323066445987663910908767622165095208826200954479561618790257205915675265313818311406127354779480712133033757720117675176405209288959380537060324636594245427706556416191726066471708498586277817285426928723609835008292084080538753201459376063902969706701667490664316841101595224876802504424746310838127241020823651213324579929066785699769578466699967727020306527057185084909523713197830576987072076454405267486608354440156452125172049093160628840221888272116013199116569214013996185637140923602034201009095696719910965705509595628,"H2i":12200384646752241579976259232098382970354307093774030710374960853644929313996225667617076305138824200773395277988919040236132937185396549369542935161875239756505104586544650297790923215288275058570897362869526446130788732811419766964967017276835348423627008837126215741085123016383332325940852408958853934412660510399824892196781693463027372430631217410650810103238763962451284514557282305008205599104191305801679939664630511491104063421807413639454177358852485226094888248161852164965603640486367659690376830772115600055051084107277861489152742292666390189224297716658768411431609911050704684657056556256880423460720,"Alpha":23300332876750103251237227048574590447379913613801272532510124473429290803423083502519971525286552461123759545660655175778475870822505963454261353216519202487193991965727706655186149989210433307949335555781095473402129935487138335217727216010693458515412245634171842581789827295651289821360488007487964832106572899411501524661082029651405344976795845601445316988216903250571350759750576439029949066040378122825697646020303266281537414096152018885734405360710523281142001267367333050504719641543727352974857213863243815562886691272109948010274169422250246450363769598849743993620978664009452648618822005892530117258331,"Beta":2534166047927725318791824172960116917843552215198638103113341163149480377420794251969714143317821379007540482042224193838130003513451297431890471730220885012611873831522777203112446040094780679969632641496751708336325873664082610525199122457113594337055192019447867932328462775220808663006226587292783781575807764223231652099385754554392612251410033887803313530798155833464721706318951078993085347388584140925234192526386132621123852980528239207267316340547156121756913368570362018641312552624302645212896157759221578143866925272746510890569411763813137743560164449226748489921792886205456032275022834591087160894226,"P":87684154738782061313086116044988283754424865443628906617900867296710397990202299345969131805991045014484552915164110726741382733873591202211268387486059703034486515933653465335272146440122553059167795953572936286393083071233554350198604012555120691245736319562861114254514671981751300817893308115225453100769,"Q":88394840552439295667689495221446852363776378041526739827159374682867725531676627667306940267946516555020832447263729538790333494892600936388335911397214533753404105427634220284214242509326156781414204453275659894960381505509021581782161299618850107279147574642362786241754680954729961565957066332054718790203}
Loading

0 comments on commit 0c3e5ff

Please sign in to comment.