Skip to content

Commit

Permalink
Merge branch 'develop' into decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
shileiwill committed Apr 18, 2024
2 parents e9c06b9 + 8337fc8 commit 5a9f84a
Show file tree
Hide file tree
Showing 182 changed files with 3,411 additions and 3,148 deletions.
6 changes: 6 additions & 0 deletions .changeset/flat-guests-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"chainlink": minor
---

#internal Gas Estimator L1Oracles to be chain specific
#removed cmd/arbgas
5 changes: 5 additions & 0 deletions .changeset/gold-bottles-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#added : Re-enable abandoned transaction tracker
5 changes: 5 additions & 0 deletions .changeset/great-rockets-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#wip Keystone wrapper regenerate
5 changes: 5 additions & 0 deletions .changeset/new-forks-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": removed
---

Drop unused queryTimeout config from TXM strategy #internal
5 changes: 5 additions & 0 deletions .changeset/pretty-flies-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

cor/services/relay/evm/mercury: switch to sqlutil.DataStore #internal
5 changes: 5 additions & 0 deletions .changeset/soft-hotels-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

switch more EVM components to use sqlutil.DataStore #internal
5 changes: 5 additions & 0 deletions .changeset/weak-emus-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Updated FindTxesWithAttemptsAndReceiptsByIdsAndState method signature to accept int64 for tx ID instead of big.Int
26 changes: 11 additions & 15 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
changeset:
env:
TAGS: |
#nops : For any feature that is NOP facing and needs to be in the official Release Notes for the release.
#added : For any new functionality added.
#changed : For any change to the existing functionality.
#removed : For any functionality/config that is removed.
#updated : For any functionality that is updated.
#deprecation_notice : For any upcoming deprecation functionality.
#breaking_change : For any functionality that requires manual action for the node to boot.
#db_update : For any feature that introduces updates to database schema.
#wip : For any change that is not ready yet and external communication about it should be held off till it is feature complete.
#bugfix - For bug fixes.
#internal - For changesets that need to be excluded from the final changelog.
- `#added` For any new functionality added.
- `#breaking_change` For any functionality that requires manual action for the node to boot.
- `#bugfix` For bug fixes.
- `#changed` For any change to the existing functionality.
- `#db_update` For any feature that introduces updates to database schema.
- `#deprecation_notice` For any upcoming deprecation functionality.
- `#internal` For changesets that need to be excluded from the final changelog.
- `#nops` For any feature that is NOP facing and needs to be in the official Release Notes for the release.
- `#removed` For any functionality/config that is removed.
- `#updated` For any functionality that is updated.
- `#wip` For any change that is not ready yet and external communication about it should be held off till it is feature complete.
# For security reasons, GITHUB_TOKEN is read-only on forks, so we cannot leave comments on PRs.
# This check skips the job if it is detected we are running on a fork.
Expand Down Expand Up @@ -66,9 +66,7 @@ jobs:
with:
message: |
I see you updated files related to `core`. Please run `pnpm changeset` in the root directory to add a changeset as well as in the text include at least one of the following tags:
```
${{ env.TAGS }}
```
reactions: eyes
comment_tag: changeset-core

Expand Down Expand Up @@ -111,9 +109,7 @@ jobs:
with:
message: |
I see you added a changeset file but it does not contain a tag. Please edit the text include at least one of the following tags:
```
${{ env.TAGS }}
```
reactions: eyes
comment_tag: changeset-core-tags

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser-build-publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
role-duration-seconds: ${{ secrets.AWS_ROLE_DURATION_SECONDS }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true
role-session-name: goreleaser-build-publish-chainlink.push-chainlink-develop-goreleaser
role-session-name: goreleaser-build-publish-chainlink.push-develop
- name: Build, sign, and publish image
id: build-sign-publish
uses: ./.github/actions/goreleaser-build-sign-publish
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-chart-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: Get Github Token
id: get-gh-token
uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5874ff7211cf5a5a2670bb010fbff914eaaae138 # v2.3.12
with:
url: ${{ secrets.GATI_LAMBDA_FUNCTION_URL }}

Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ jobs:
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ inputs.evm-ref || github.sha }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: ${{ matrix.product.name }}-test-logs
artifacts_location: |
./integration-tests/smoke/logs/
/tmp/gotest.log
Expand Down Expand Up @@ -470,6 +471,7 @@ jobs:
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ inputs.evm-ref || github.sha }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: ${{ matrix.product.name }}-test-logs
artifacts_location: |
./integration-tests/smoke/logs/
/tmp/gotest.log
Expand Down Expand Up @@ -854,6 +856,7 @@ jobs:
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ steps.get_latest_version.outputs.latest_version }}
artifacts_name: node-migration-test-logs
artifacts_location: |
./integration-tests/migration/logs
/tmp/gotest.log
Expand All @@ -865,14 +868,6 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}
- name: Upload test log
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: test-log-${{ matrix.product.name }}
path: /tmp/gotest.log
retention-days: 7
continue-on-error: true
- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand Down Expand Up @@ -1160,21 +1155,17 @@ jobs:
test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} && make test_smoke
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ inputs.evm-ref || github.sha }}
artifacts_location: /home/runner/work/chainlink-solana/chainlink-solana/integration-tests/logs
publish_check_name: Solana Smoke Test Results
go_mod_path: ./integration-tests/go.mod
cache_key_id: core-solana-e2e-${{ env.MOD_CACHE_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: solana-test-logs
artifacts_location: |
./integration-tests/smoke/logs
/tmp/gotest.log
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ""
run_setup: false
- name: Upload test log
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: test-log-solana
path: /tmp/gotest.log
retention-days: 7
continue-on-error: true

2 changes: 1 addition & 1 deletion .github/workflows/operator-ui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Get Github Token
id: get-gh-token
uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11
uses: smartcontractkit/chainlink-github-actions/github-app-token-issuer@5874ff7211cf5a5a2670bb010fbff914eaaae138 # v2.3.12
with:
url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
FOUNDRY_PROFILE: ${{ matrix.product }}

- name: Run Forge snapshot
if: ${{ !contains(fromJson('["vrf"]'), matrix.product) && !contains(fromJson('["automation"]'), matrix.product) && needs.changes.outputs.changes == 'true' }}
if: ${{ !contains(fromJson('["vrf"]'), matrix.product) && !contains(fromJson('["automation"]'), matrix.product) && !contains(fromJson('["keystone"]'), matrix.product) && needs.changes.outputs.changes == 'true' }}
run: |
forge snapshot --nmt "testFuzz_\w{1,}?" --check gas-snapshots/${{ matrix.product }}.gas-snapshot
id: snapshot
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@ override*.toml

# Pythin venv
.venv/

ocr_soak_report.csv
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ core/scripts/gateway @smartcontractkit/functions
/contracts/src/v0.8/l2ep @chris-de-leon-cll
/contracts/src/v0.8/llo-feeds @smartcontractkit/mercury-team
# TODO: mocks folder, folder should be removed and files moved to the correct folders
/contracts/src/v0.8/operatorforwarder @RensR
/contracts/src/v0.8/operatorforwarder @austinborn
/contracts/src/v0.8/shared @RensR
# TODO: tests folder, folder should be removed and files moved to the correct folders
# TODO: transmission folder, owner should be found
Expand Down
2 changes: 1 addition & 1 deletion common/txmgr/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ func (eb *Broadcaster[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) save
// is relatively benign and probably nobody will ever run into it in
// practice, but something to be aware of.
if etx.PipelineTaskRunID.Valid && eb.resumeCallback != nil && etx.SignalCallback {
err := eb.resumeCallback(etx.PipelineTaskRunID.UUID, nil, fmt.Errorf("fatal error while sending transaction: %s", etx.Error.String))
err := eb.resumeCallback(ctx, etx.PipelineTaskRunID.UUID, nil, fmt.Errorf("fatal error while sending transaction: %s", etx.Error.String))
if errors.Is(err, sql.ErrNoRows) {
lgr.Debugw("callback missing or already resumed", "etxID", etx.ID)
} else if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion common/txmgr/confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ func (ec *Confirmer[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Res
}

ec.lggr.Debugw("Callback: resuming tx with receipt", "output", output, "taskErr", taskErr, "pipelineTaskRunID", data.ID)
if err := ec.resumeCallback(data.ID, output, taskErr); err != nil {
if err := ec.resumeCallback(ctx, data.ID, output, taskErr); err != nil {
return fmt.Errorf("failed to resume suspended pipeline run: %w", err)
}
// Mark tx as having completed callback
Expand Down
8 changes: 4 additions & 4 deletions common/txmgr/mocks/tx_manager.go

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

3 changes: 0 additions & 3 deletions common/txmgr/resender.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ func (er *Resender[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) resendUnco
return fmt.Errorf("Resender failed getting enabled keys for chain %s: %w", er.chainID.String(), err)
}

// Tracker currently disabled for BCI-2638; refactor required
// resendAddresses = append(resendAddresses, er.tracker.GetAbandonedAddresses()...)

ageThreshold := er.txConfig.ResendAfterThreshold()
maxInFlightTransactions := er.txConfig.MaxInFlight()
olderThan := time.Now().Add(-ageThreshold)
Expand Down
18 changes: 6 additions & 12 deletions common/txmgr/strategies.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package txmgr
import (
"context"
"fmt"
"time"

"github.com/google/uuid"

Expand All @@ -14,9 +13,9 @@ var _ txmgrtypes.TxStrategy = SendEveryStrategy{}

// NewQueueingTxStrategy creates a new TxStrategy that drops the oldest transactions after the
// queue size is exceeded if a queue size is specified, and otherwise does not drop transactions.
func NewQueueingTxStrategy(subject uuid.UUID, queueSize uint32, queryTimeout time.Duration) (strategy txmgrtypes.TxStrategy) {
func NewQueueingTxStrategy(subject uuid.UUID, queueSize uint32) (strategy txmgrtypes.TxStrategy) {
if queueSize > 0 {
strategy = NewDropOldestStrategy(subject, queueSize, queryTimeout)
strategy = NewDropOldestStrategy(subject, queueSize)
} else {
strategy = SendEveryStrategy{}
}
Expand All @@ -41,26 +40,21 @@ var _ txmgrtypes.TxStrategy = DropOldestStrategy{}
// DropOldestStrategy will send the newest N transactions, older ones will be
// removed from the queue
type DropOldestStrategy struct {
subject uuid.UUID
queueSize uint32
queryTimeout time.Duration
subject uuid.UUID
queueSize uint32
}

// NewDropOldestStrategy creates a new TxStrategy that drops the oldest transactions after the
// queue size is exceeded.
func NewDropOldestStrategy(subject uuid.UUID, queueSize uint32, queryTimeout time.Duration) DropOldestStrategy {
return DropOldestStrategy{subject, queueSize, queryTimeout}
func NewDropOldestStrategy(subject uuid.UUID, queueSize uint32) DropOldestStrategy {
return DropOldestStrategy{subject, queueSize}
}

func (s DropOldestStrategy) Subject() uuid.NullUUID {
return uuid.NullUUID{UUID: s.subject, Valid: true}
}

func (s DropOldestStrategy) PruneQueue(ctx context.Context, pruneService txmgrtypes.UnstartedTxQueuePruner) (ids []int64, err error) {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, s.queryTimeout)
defer cancel()

// NOTE: We prune one less than the queue size to prevent the queue from exceeding the max queue size. Which could occur if a new transaction is added to the queue right after we prune.
ids, err = pruneService.PruneUnstartedTxQueue(ctx, s.queueSize-1, s.subject)
if err != nil {
Expand Down
Loading

0 comments on commit 5a9f84a

Please sign in to comment.