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

Keystone e2e test #15182

Open
wants to merge 122 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
36031ed
init, wip
skudasov Oct 17, 2024
5420691
fix go mod
skudasov Oct 17, 2024
fc73619
fix go mod again
skudasov Oct 17, 2024
038b11e
update
skudasov Oct 17, 2024
b7a94b5
fix go mod
skudasov Oct 17, 2024
05b2233
ready to test
skudasov Oct 17, 2024
ab0baf3
update deps
skudasov Oct 17, 2024
0a13f5e
update
skudasov Oct 18, 2024
7d8ffb3
update README
skudasov Oct 18, 2024
dce9c56
fix
skudasov Oct 18, 2024
d6cc825
fix readme
skudasov Oct 18, 2024
9be9a8a
try mockserver in CI
skudasov Oct 21, 2024
dc8fe4d
try reach the localhost mock in CI
skudasov Oct 21, 2024
cc4e526
check it can work both locally and in CI without code modification
skudasov Oct 21, 2024
e0465e6
check again
skudasov Oct 21, 2024
c75d06e
use the same Go version
skudasov Oct 21, 2024
c143938
example of CL client connection
skudasov Oct 21, 2024
85d9973
connect all the clients
skudasov Oct 21, 2024
3111ad8
example with contracts
skudasov Oct 21, 2024
d1ca470
finalize
skudasov Oct 22, 2024
cf1ea62
readmes
skudasov Oct 22, 2024
95c9562
ignore caching, update
skudasov Oct 22, 2024
2674e22
change CI workflow name
skudasov Oct 22, 2024
8e8597a
re-trigger
skudasov Oct 22, 2024
8fd3436
fix readme
skudasov Oct 22, 2024
547f054
switch to v0.1.0
skudasov Oct 23, 2024
7639522
fix go mod
skudasov Oct 23, 2024
d2581b2
use strict config version
skudasov Oct 23, 2024
430f573
update go mod
skudasov Oct 23, 2024
2ddc36c
add Sepolia example
skudasov Oct 23, 2024
81c972f
simplify configuration
skudasov Oct 24, 2024
5a82459
copy capabilities into container
skudasov Oct 24, 2024
f28c64a
expose p2p ports, add Fuji example
skudasov Oct 24, 2024
87beabc
fund nodes
skudasov Oct 24, 2024
29d8b77
use shared PG nodeset
skudasov Oct 25, 2024
db528ae
static node names
skudasov Oct 25, 2024
cde6a27
capabilities perms
skudasov Oct 25, 2024
91aa2a4
capabilities perms again
skudasov Oct 25, 2024
f5a1a79
unified config for one or more node overrides
skudasov Oct 28, 2024
b1145e3
comment config
skudasov Oct 28, 2024
7503510
docker rebuild from config
skudasov Oct 29, 2024
3cd15e1
simplify, explicit rebuild using config, no flags
skudasov Oct 29, 2024
95e45ae
--wip-- [skip CI]
DeividasK Oct 25, 2024
5298829
Fetch node keys and generate OCR3 config
DeividasK Oct 25, 2024
8c942eb
Configure KV store OCR contract
DeividasK Oct 25, 2024
dc0aeb6
--wip-- [skip CI]
DeividasK Oct 29, 2024
9bcf265
Merge
DeividasK Oct 29, 2024
725a5d3
Working capability setup
DeividasK Oct 29, 2024
67e3efa
Deploy mock streams capabilities
DeividasK Oct 31, 2024
3ce6f55
OCR3 not working (incorrect keys)
DeividasK Oct 31, 2024
e2b0887
--wip-- [skip CI]
DeividasK Nov 4, 2024
df8f8d3
OCR3 capability added successfully
DeividasK Nov 4, 2024
1590f69
Target capability configuration
DeividasK Nov 5, 2024
db84b3c
--wip-- [skip CI]
DeividasK Nov 5, 2024
d2f2a73
--wip-- [skip CI]
DeividasK Nov 6, 2024
0881f6a
--wip-- [skip CI]
DeividasK Nov 11, 2024
e0eba92
--wip-- [skip CI]
DeividasK Nov 11, 2024
e6e73fd
--wip-- [skip CI]
DeividasK Nov 11, 2024
5d381df
OCR endpoint initializes
DeividasK Nov 12, 2024
342aae6
fix, use default configs on start and replace config instead overridi…
skudasov Nov 13, 2024
4c4d151
--wip-- [skip CI]
DeividasK Nov 19, 2024
421ebf6
Merge branch 'develop' into dk-keystone-e2e-test
DeividasK Nov 19, 2024
b7fee52
Add workflows
DeividasK Nov 20, 2024
fd9acca
--wip-- [skip CI]
DeividasK Nov 21, 2024
781f6c6
E2E test sets up the environment correctly
DeividasK Nov 22, 2024
6642fee
Cleanup
DeividasK Nov 22, 2024
b7e606d
Cleanup
DeividasK Nov 22, 2024
73caca4
Run the test in CI
DeividasK Nov 22, 2024
64bbe1b
Less logs; increase timeout
DeividasK Nov 22, 2024
0dfdbfc
Reduce timeout
DeividasK Nov 22, 2024
d170c19
Move things around and cleanup
DeividasK Nov 25, 2024
a05205d
Refactor capabiliteis registry evm contract wrapper
DeividasK Nov 25, 2024
a60018e
Update go.mod and tidy
DeividasK Nov 25, 2024
f892377
Update CI config
DeividasK Nov 25, 2024
5a47543
Cleanup
DeividasK Nov 25, 2024
6e49339
Increase go test timeout
DeividasK Nov 25, 2024
dda8e3b
Upgrade CTFv2
DeividasK Nov 25, 2024
c366f08
try beefy machine
skudasov Nov 25, 2024
c9c9228
Double OCR timeouts config
DeividasK Nov 26, 2024
a86bff5
Add sleep 20
DeividasK Nov 26, 2024
1b8fe62
Log URLs
DeividasK Nov 26, 2024
001c70d
Add mroe sleep
DeividasK Nov 26, 2024
5c26247
Try another thing
DeividasK Nov 26, 2024
1a21e70
Print entire job spec
DeividasK Nov 26, 2024
1ec9511
try the version with exposed raw IPs
skudasov Nov 26, 2024
e1974e6
increase timeout, try non-aliased network
skudasov Nov 26, 2024
a3fa576
try 32 cores and log ips
skudasov Nov 26, 2024
1630563
try no-ipv6 network
skudasov Nov 26, 2024
532d64c
long blocks, add logs
skudasov Nov 26, 2024
6481c5b
fix upload
skudasov Nov 26, 2024
3aec009
update the framework, switch back the runner
skudasov Nov 26, 2024
e74c833
Use explicit linux amd64 streams binary
DeividasK Nov 27, 2024
e202dce
Polish
DeividasK Nov 27, 2024
7aa7883
Go mod tidy
DeividasK Nov 27, 2024
851990d
Remove sleep
DeividasK Nov 27, 2024
271a5db
Reduce test waiting time
DeividasK Nov 27, 2024
7058d3a
Run generate
DeividasK Nov 27, 2024
31249fe
Reduce test timeout windown
DeividasK Nov 27, 2024
f41b892
Merge remote-tracking branch 'origin/develop' into dk-keystone-e2e-test
DeividasK Nov 27, 2024
1f25769
update CTF, update dockerfile paths
skudasov Nov 27, 2024
a04e8b3
Move e2e tests to the integration-tests folder
DeividasK Nov 28, 2024
c0c9078
Update CI
DeividasK Nov 28, 2024
1b3d82e
Re-generate & tidy
DeividasK Nov 28, 2024
ef5d6d4
Fix lint issues
DeividasK Nov 28, 2024
8e4dcdd
upgrade CTF
skudasov Dec 2, 2024
53c1a3d
Merge branch 'develop' into dk-keystone-e2e-test
skudasov Dec 2, 2024
5006478
merge
skudasov Dec 2, 2024
29680ef
try with built image
skudasov Dec 2, 2024
843b6ff
debug image
skudasov Dec 2, 2024
50ac1b8
combine CL image with version
skudasov Dec 2, 2024
d16311a
try tag
skudasov Dec 2, 2024
c92fea5
require build
skudasov Dec 2, 2024
591c9f2
try different region
skudasov Dec 2, 2024
fcbd7f7
stub missing region
skudasov Dec 2, 2024
7cfab70
re-trigger
skudasov Dec 2, 2024
49b858e
auth
skudasov Dec 2, 2024
e7bd381
remove incompatible image build
skudasov Dec 2, 2024
18bc11a
rollback config
skudasov Dec 2, 2024
9f62f89
Updates to get the test working again
DeividasK Dec 3, 2024
bb02a58
Add more logs
DeividasK Dec 3, 2024
4a14601
Change OCR configuration
DeividasK Dec 3, 2024
d0b7af3
Change OCR config again
DeividasK Dec 3, 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: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ credentials.env
gcr_creds.env

go.work
go.work.sum
go.work.sum

e2e/
34 changes: 34 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run E2E tests (CTFv2)

on:
push:

jobs:
test:
runs-on: ubuntu-latest
env:
CTF_CONFIGS: smoke.toml
CTF_LOG_LEVEL: info
CTF_LOKI_STREAM: "false"
PRIVATE_KEY: ${{ secrets.CTF_SIMULATED_KEY_1 }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22.8
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: go-modules-${{ hashFiles('**/go.sum') }}-${{ runner.os }}
restore-keys: |
go-modules-${{ hashFiles('**/go.sum') }}-${{ runner.os }}
- name: Install dependencies
run: go mod download
- name: Run tests
working-directory: e2e/capabilities
run: go test -v -run TestDON
1 change: 1 addition & 0 deletions contracts/scripts/native_solc_compile_all_keystone
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ compileContract keystone/CapabilitiesRegistry.sol
compileContract keystone/KeystoneForwarder.sol
compileContract keystone/OCR3Capability.sol
compileContract keystone/KeystoneFeedsConsumer.sol
compileContract keystone/SimpleOCR.sol
66 changes: 66 additions & 0 deletions contracts/src/v0.8/keystone/ConfirmedOwnerWithProposal.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title The ConfirmedOwner contract
/// @notice A contract with helpers for basic contract ownership.
contract ConfirmedOwnerWithProposal {
address private s_owner;
address private s_pendingOwner;

event OwnershipTransferRequested(address indexed from, address indexed to);
event OwnershipTransferred(address indexed from, address indexed to);

constructor(address newOwner, address pendingOwner) {
// solhint-disable-next-line gas-custom-errors
require(newOwner != address(0), "Cannot set owner to zero");

s_owner = newOwner;
if (pendingOwner != address(0)) {
_transferOwnership(pendingOwner);
}
}

/// @notice Allows an owner to begin transferring ownership to a new address.
function transferOwnership(address to) public onlyOwner {
_transferOwnership(to);
}

/// @notice Allows an ownership transfer to be completed by the recipient.
function acceptOwnership() external {
// solhint-disable-next-line gas-custom-errors
require(msg.sender == s_pendingOwner, "Must be proposed owner");

address oldOwner = s_owner;
s_owner = msg.sender;
s_pendingOwner = address(0);

emit OwnershipTransferred(oldOwner, msg.sender);
}

/// @notice Get the current owner
function owner() public view returns (address) {
return s_owner;
}

/// @notice validate, transfer ownership, and emit relevant events
function _transferOwnership(address to) private {
// solhint-disable-next-line gas-custom-errors
require(to != msg.sender, "Cannot transfer to self");

s_pendingOwner = to;

emit OwnershipTransferRequested(s_owner, to);
}

/// @notice validate access
function _validateOwnership() internal view {
// solhint-disable-next-line gas-custom-errors
require(msg.sender == s_owner, "Only callable by owner");
}

/// @notice Reverts if called by anyone other than the contract owner.
modifier onlyOwner() {
_validateOwnership();
_;
}
}
Loading
Loading