Skip to content

Commit

Permalink
Merge pull request #12476 from smartcontractkit/release-2.9.1-vrf-202…
Browse files Browse the repository at this point in the history
…40318-contract-changes

Release 2.9.1 vrf 20240318 contract changes
  • Loading branch information
kidambisrinivas authored Mar 18, 2024
2 parents 63b5e02 + 990aa9a commit 09bb6fa
Show file tree
Hide file tree
Showing 131 changed files with 11,696 additions and 5,161 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-crabs-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Soft delete consumer nonce in VRF coordinator v2.5
5 changes: 5 additions & 0 deletions .changeset/nasty-humans-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

add pending request counter for vrf v2.5 coordinator
5 changes: 5 additions & 0 deletions .changeset/pretty-fishes-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

VRF V2+ Coordinator msg.data len validation
5 changes: 5 additions & 0 deletions .changeset/sixty-turtles-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Add rebalancer support for feeds manager ocr2 plugins
5 changes: 5 additions & 0 deletions .changeset/tasty-buckets-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Validation for premium limits added to VRFCoordinatorV2_5 contract
5 changes: 5 additions & 0 deletions .changeset/wild-walls-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Validate if flat fee configs are configured correctly
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,11 @@ jobs:
os: ubuntu-latest
pyroscope_env: ci-smoke-vrf-evm-simulated
- name: vrfv2
nodes: 3
nodes: 4
os: ubuntu-latest
pyroscope_env: ci-smoke-vrf2-evm-simulated
- name: vrfv2plus
nodes: 3
nodes: 4
os: ubuntu-latest
pyroscope_env: ci-smoke-vrf2plus-evm-simulated
- name: forwarder_ocr
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/on-demand-vrfv2-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
description: Performance Test Type of test to run
type: choice
options:
- "Smoke"
- "Soak"
- "Load"
- "Stress"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/on-demand-vrfv2plus-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
description: Performance Test Type of test to run
type: choice
options:
- "Smoke"
- "Soak"
- "Load"
- "Stress"
Expand Down
30 changes: 30 additions & 0 deletions common/client/mock_rpc_test.go

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

11 changes: 11 additions & 0 deletions common/client/multi_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,17 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP
return n.RPC().CallContract(ctx, attempt, blockNumber)
}

func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT]) PendingCallContract(
ctx context.Context,
attempt interface{},
) (rpcErr []byte, extractErr error) {
n, err := c.selectNode()
if err != nil {
return rpcErr, err
}
return n.RPC().PendingCallContract(ctx, attempt)
}

// ChainID makes a direct RPC call. In most cases it should be better to use the configured chain id instead by
// calling ConfiguredChainID.
func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT]) ChainID(ctx context.Context) (id CHAIN_ID, err error) {
Expand Down
4 changes: 4 additions & 0 deletions common/client/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ type clientAPI[
msg interface{},
blockNumber *big.Int,
) (rpcErr []byte, extractErr error)
PendingCallContract(
ctx context.Context,
msg interface{},
) (rpcErr []byte, extractErr error)
CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error
CodeAt(ctx context.Context, account ADDR, blockNumber *big.Int) ([]byte, error)
}
Expand Down
4 changes: 4 additions & 0 deletions common/txmgr/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ type TxMeta[ADDR types.Hashable, TX_HASH types.Hashable] struct {
// Used for keepers
UpkeepID *string `json:"UpkeepID,omitempty"`

// Used for VRF to know if the txn is a ForceFulfilment txn
ForceFulfilled *bool `json:"ForceFulfilled,omitempty"`
ForceFulfillmentAttempt *uint64 `json:"ForceFulfillmentAttempt,omitempty"`

// Used only for forwarded txs, tracks the original destination address.
// When this is set, it indicates tx is forwarded through To address.
FwdrDestAddress *ADDR `json:"ForwarderDestAddress,omitempty"`
Expand Down
10 changes: 10 additions & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ src = 'src/v0.8/vrf'
test = 'test/v0.8/foundry/vrf' # skips tests for no VRF foundry tests
solc_version = '0.8.6'

[profile.vrfv2plus_coordinator]
optimizer_runs = 50
src = 'src/v0.8/vrf'
solc_version = '0.8.6'

[profile.vrfv2plus]
optimizer_runs = 1_000_000
src = 'src/v0.8/vrf'
solc_version = '0.8.6'

[profile.automation]
optimizer_runs = 10000
src = 'src/v0.8/automation'
Expand Down
Loading

0 comments on commit 09bb6fa

Please sign in to comment.