mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
Revert "CI changes to accommodate Anvil"
This commit is contained in:
parent
d5b5ae1fa0
commit
65a5f58218
3 changed files with 74 additions and 93 deletions
18
.github/matic-cli-config.yml
vendored
18
.github/matic-cli-config.yml
vendored
|
|
@ -2,11 +2,15 @@ devnetType: docker
|
||||||
|
|
||||||
defaultFee: 2000
|
defaultFee: 2000
|
||||||
defaultStake: 10000
|
defaultStake: 10000
|
||||||
|
|
||||||
borChainId: 15001
|
borChainId: 15001
|
||||||
heimdallChainId: heimdall-15001
|
heimdallChainId: heimdall-15001
|
||||||
contractsRepo: https://github.com/0xPolygon/pos-contracts.git
|
|
||||||
contractsBranch: anvil-pos
|
borDockerBuildContext: '../../bor'
|
||||||
|
heimdallDockerBuildContext: 'https://github.com/maticnetwork/heimdall.git#develop'
|
||||||
|
|
||||||
genesisContractsBranch: master
|
genesisContractsBranch: master
|
||||||
|
contractsBranch: mardizzone/node-16
|
||||||
|
|
||||||
blockTime:
|
blockTime:
|
||||||
- '2'
|
- '2'
|
||||||
|
|
@ -27,12 +31,6 @@ devnetBorFlags: config,config,config
|
||||||
numOfErigonValidators: 0
|
numOfErigonValidators: 0
|
||||||
numOfErigonSentries: 0
|
numOfErigonSentries: 0
|
||||||
numOfErigonArchiveNodes: 0
|
numOfErigonArchiveNodes: 0
|
||||||
ethURL: http://anvil:9545
|
|
||||||
|
ethURL: http://ganache:9545
|
||||||
ethHostUser: ubuntu
|
ethHostUser: ubuntu
|
||||||
devnetType: docker
|
|
||||||
borDockerBuildContext: "../../bor"
|
|
||||||
heimdallDockerBuildContext: "https://github.com/maticnetwork/heimdall.git#develop"
|
|
||||||
sprintSizeBlockNumber:
|
|
||||||
- '0'
|
|
||||||
devnetBorFlags: config,config,config
|
|
||||||
mnemonic: 'clock radar mass judge dismiss just intact mind resemble fringe diary casino'
|
|
||||||
|
|
|
||||||
130
.github/workflows/ci.yml
vendored
130
.github/workflows/ci.yml
vendored
|
|
@ -188,96 +188,60 @@ jobs:
|
||||||
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: bor
|
path: bor
|
||||||
- name: Checkout submodules
|
- name: Checkout submodules
|
||||||
run: |
|
run: |
|
||||||
cd bor
|
cd bor
|
||||||
git submodule update --init --recursive --force
|
git submodule update --init --recursive --force
|
||||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
go-version: 1.23.x
|
||||||
|
|
||||||
- name: Checkout matic-cli
|
- name: Checkout matic-cli
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: maticnetwork/matic-cli
|
repository: maticnetwork/matic-cli
|
||||||
ref: master
|
ref: master
|
||||||
path: matic-cli
|
path: matic-cli
|
||||||
|
|
||||||
- name: Install dependencies on Linux
|
- name: Install dependencies on Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install build-essential
|
sudo apt install build-essential
|
||||||
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
|
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
|
||||||
sudo snap install solc
|
sudo snap install solc
|
||||||
sudo apt install python2 jq curl
|
sudo apt install python2 jq curl
|
||||||
sudo ln -sf /usr/bin/python2 /usr/bin/python
|
sudo ln -sf /usr/bin/python2 /usr/bin/python
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18.19.0'
|
node-version: '18.19.0'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: |
|
cache-dependency-path: |
|
||||||
matic-cli/package-lock.json
|
matic-cli/package-lock.json
|
||||||
matic-cli/devnet/code/contracts/package-lock.json
|
matic-cli/devnet/code/contracts/package-lock.json
|
||||||
matic-cli/devnet/code/genesis-contracts/package-lock.json
|
matic-cli/devnet/code/genesis-contracts/package-lock.json
|
||||||
matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json
|
matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json
|
||||||
|
|
||||||
- name: Install Foundry
|
- name: Bootstrap devnet
|
||||||
uses: foundry-rs/foundry-toolchain@v1
|
run: |
|
||||||
|
cd matic-cli
|
||||||
|
npm install --prefer-offline --no-audit --progress=false
|
||||||
|
mkdir devnet
|
||||||
|
cd devnet
|
||||||
|
../bin/matic-cli.js setup devnet -c ../../bor/.github/matic-cli-config.yml
|
||||||
|
|
||||||
- name: Bootstrap devnet
|
- name: Launch devnet
|
||||||
run: |
|
run: |
|
||||||
cd matic-cli
|
cd matic-cli/devnet
|
||||||
npm install --prefer-offline --no-audit --progress=false
|
bash ../util-scripts/docker/devnet_setup.sh
|
||||||
mkdir devnet
|
|
||||||
cd devnet
|
|
||||||
../bin/matic-cli.js setup devnet -c ../../bor/.github/matic-cli-config.yml
|
|
||||||
|
|
||||||
- name: Launch devnet
|
|
||||||
run: |
|
|
||||||
cd matic-cli/devnet
|
|
||||||
bash ../util-scripts/docker/devnet_setup.sh
|
|
||||||
cd -
|
|
||||||
timeout 2m bash bor/integration-tests/bor_health.sh
|
|
||||||
|
|
||||||
- name: Run smoke tests
|
|
||||||
run: |
|
|
||||||
echo "Deposit 100 matic for each account to bor network"
|
|
||||||
cd matic-cli/devnet/devnet
|
|
||||||
SCRIPT_ADDRESS=$(jq -r '.[0].address' signer-dump.json)
|
|
||||||
SCRIPT_PRIVATE_KEY=$(jq -r '.[0].priv_key' signer-dump.json)
|
|
||||||
cd ../code/pos-contracts
|
|
||||||
CONTRACT_ADDRESS=$(jq -r .root.tokens.MaticToken contractAddresses.json)
|
|
||||||
forge script scripts/matic-cli-scripts/Deposit.s.sol:MaticDeposit --rpc-url http://localhost:9545 --private-key $SCRIPT_PRIVATE_KEY --broadcast --sig "run(address,address,uint256)" $SCRIPT_ADDRESS $CONTRACT_ADDRESS 100000000000000000000
|
|
||||||
cd ../../../..
|
|
||||||
timeout 60m bash bor/integration-tests/smoke_test.sh
|
|
||||||
|
|
||||||
- name: Run RPC Tests
|
|
||||||
run: |
|
|
||||||
echo "Starting RPC Tests..."
|
|
||||||
timeout 5m bash bor/integration-tests/rpc_test.sh
|
|
||||||
|
|
||||||
- name: Upload logs
|
|
||||||
if: always()
|
|
||||||
uses: actions/upload-artifact@v4.4.0
|
|
||||||
with:
|
|
||||||
name: logs_${{ github.run_id }}
|
|
||||||
path: |
|
|
||||||
matic-cli/devnet/logs
|
|
||||||
|
|
||||||
- name: Package code and chain data
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
cd matic-cli/devnet
|
|
||||||
docker compose down --remove-orphans
|
|
||||||
cd -
|
cd -
|
||||||
timeout 2m bash bor/integration-tests/bor_health.sh
|
timeout 2m bash bor/integration-tests/bor_health.sh
|
||||||
|
|
||||||
- name: Run smoke tests
|
- name: Run smoke tests
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
19
integration-tests/fund_ganache_accounts.sh
Normal file
19
integration-tests/fund_ganache_accounts.sh
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
host='localhost'
|
||||||
|
|
||||||
|
echo "Transferring 1 ETH from ganache account[0] to all others..."
|
||||||
|
|
||||||
|
signersFile="matic-cli/devnet/devnet/signer-dump.json"
|
||||||
|
signersDump=$(jq . $signersFile)
|
||||||
|
signersLength=$(jq '. | length' $signersFile)
|
||||||
|
|
||||||
|
rootChainWeb3="http://${host}:9545"
|
||||||
|
|
||||||
|
for ((i = 1; i < signersLength; i++)); do
|
||||||
|
to_address=$(echo "$signersDump" | jq -r ".[$i].address")
|
||||||
|
from_address=$(echo "$signersDump" | jq -r ".[0].address")
|
||||||
|
txReceipt=$(curl $rootChainWeb3 -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"to":"'"$to_address"'","from":"'"$from_address"'","value":"0xDE0B6B3A7640000"}],"id":1}' -H "Content-Type: application/json")
|
||||||
|
txHash=$(echo "$txReceipt" | jq -r '.result')
|
||||||
|
echo "Funds transferred from $from_address to $to_address with txHash: $txHash"
|
||||||
|
done
|
||||||
Loading…
Reference in a new issue