Skip to content

Commit

Permalink
Merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Nov 20, 2024
2 parents eef9c9c + 226211a commit 6c0cc06
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .github/actions/goreleaser-build-sign-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ runs:
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.0
with:
buildkitd-flags: ${{ inputs.enable-debug == 'true' && '--debug' || '' }}
# v0.16.0 until grpc fix is released
# see: https://github.com/docker/buildx/issues/2789#issuecomment-2487981922
driver-opts: |
image=moby/buildkit:v0.16.0
- name: Set up Go
uses: ./.github/actions/setup-go
Expand Down
1 change: 0 additions & 1 deletion .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,6 @@ runner-test-matrix:
runs_on: ubuntu-latest
triggers:
- PR E2E Core Tests
- Merge Queue E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ && go test smoke/ccip_test.go -timeout 12m -test.parallel=3 -count=1 -json
pyroscope_env: ci-smoke-ccipv1_6-evm-simulated
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,41 @@ jobs:
steps:
- name: Checkout the repo
uses: actions/checkout@v4.2.1
with:
path: chainlink

- name: Checkout diff-so-fancy
uses: actions/checkout@v4.2.1
with:
repository: so-fancy/diff-so-fancy
ref: a673cb4d2707f64d92b86498a2f5f71c8e2643d5 # v1.4.3
path: diff-so-fancy

- name: Install diff-so-fancy
run: echo "$GITHUB_WORKSPACE/diff-so-fancy" >> $GITHUB_PATH

- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
uses: ./chainlink/.github/actions/setup-nodejs
with:
base-path: "chainlink"
prod: "true"

- name: Setup Go
uses: ./.github/actions/setup-go
uses: ./chainlink/.github/actions/setup-go
with:
go-version-file: "chainlink/go.mod"

- name: Run native compile and generate wrappers
working-directory: ./chainlink/contracts
run: make wrappers-all
working-directory: ./contracts

- name: Verify local solc binaries
working-directory: chainlink
run: ./tools/ci/check_solc_hashes

- name: Check if Go solidity wrappers are updated
if: ${{ needs.changes.outputs.changes == 'true' }}
working-directory: chainlink
run: |
git add --all
git diff --minimal --color --cached --exit-code | diff-so-fancy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

readermocks "github.com/smartcontractkit/chainlink-ccip/mocks/pkg/contractreader"
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-common/pkg/services/servicetest"

"github.com/smartcontractkit/chainlink-common/pkg/codec"
"github.com/smartcontractkit/chainlink-common/pkg/types"
Expand Down Expand Up @@ -797,6 +798,7 @@ func testSetup(
lggr := logger.TestLogger(t)
lggr.SetLogLevel(zapcore.ErrorLevel)
db := pgtest.NewSqlxDB(t)
t.Cleanup(func() { assert.NoError(t, db.Close()) })
lpOpts := logpoller.Opts{
PollPeriod: time.Millisecond,
FinalityDepth: 0,
Expand All @@ -812,7 +814,7 @@ func testSetup(
headTracker,
lpOpts,
)
assert.NoError(t, lp.Start(ctx))
servicetest.Run(t, lp)

for sourceChain, seqNum := range onChainSeqNums {
_, err1 := contract.SetSourceChainConfig(auth, uint64(sourceChain), ccip_reader_tester.OffRampSourceChainConfig{
Expand Down Expand Up @@ -854,7 +856,7 @@ func testSetup(
headTracker2,
lpOpts,
)
require.NoError(t, lp2.Start(ctx))
servicetest.Run(t, lp2)

cr2, err2 := evm.NewChainReaderService(ctx, lggr, lp2, headTracker2, cl2, cfg)
require.NoError(t, err2)
Expand All @@ -877,8 +879,7 @@ func testSetup(
otherCrs[chain] = ecr
}

err = cr.Start(ctx)
require.NoError(t, err)
servicetest.Run(t, cr)

contractReaders := map[cciptypes.ChainSelector]contractreader.Extended{readerChain: extendedCr}
for chain, cr := range otherCrs {
Expand All @@ -887,12 +888,6 @@ func testSetup(
contractWriters := make(map[cciptypes.ChainSelector]types.ChainWriter)
reader := ccipreaderpkg.NewCCIPReaderWithExtendedContractReaders(ctx, lggr, contractReaders, contractWriters, destChain, nil)

t.Cleanup(func() {
require.NoError(t, cr.Close())
require.NoError(t, lp.Close())
require.NoError(t, db.Close())
})

return &testSetupData{
contractAddr: address,
contract: contract,
Expand Down
9 changes: 5 additions & 4 deletions core/services/fluxmonitorv2/integrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ const fee = int64(100) // Amount paid by FA contract, in LINK-wei
const faTimeout = uint32(1)

var pollTimerPeriod = 200 * time.Millisecond // if failing due to timeouts, increase this
var oneEth = big.NewInt(1000000000000000000)
var emptyList = []common.Address{}

func oneEth() *big.Int { return big.NewInt(1000000000000000000) }

// fluxAggregatorUniverse represents the universe with which the aggregator
// contract interacts
type fluxAggregatorUniverse struct {
Expand Down Expand Up @@ -162,7 +163,7 @@ func setupFluxAggregatorUniverse(t *testing.T, configOptions ...func(cfg *fluxAg

f.sergey.GasLimit = oldGasLimit

_, err = f.linkContract.Transfer(f.sergey, f.aggregatorContractAddress, oneEth) // Actually, LINK
_, err = f.linkContract.Transfer(f.sergey, f.aggregatorContractAddress, oneEth()) // Actually, LINK
require.NoError(t, err, "failed to fund FluxAggregator contract with LINK")
f.backend.Commit()

Expand All @@ -172,9 +173,9 @@ func setupFluxAggregatorUniverse(t *testing.T, configOptions ...func(cfg *fluxAg
f.backend.Commit()
availableFunds, err := f.aggregatorContract.AvailableFunds(nil)
require.NoError(t, err, "failed to retrieve AvailableFunds")
require.Equal(t, availableFunds, oneEth)
require.Equal(t, availableFunds, oneEth())

ilogs, err := f.aggregatorContract.FilterAvailableFundsUpdated(nil, []*big.Int{oneEth})
ilogs, err := f.aggregatorContract.FilterAvailableFundsUpdated(nil, []*big.Int{oneEth()})
require.NoError(t, err, "failed to gather AvailableFundsUpdated logs")

logs := cltest.GetLogs(t, nil, ilogs)
Expand Down

0 comments on commit 6c0cc06

Please sign in to comment.