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

Martinvol/isolate 0.8 artifacts for gasPriceMinimum #10437

Merged
merged 114 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
65bea52
Added different compilation folder for 0.8 contracts
martinvol Jul 21, 2023
d57a615
Add check to see if folder is there
martinvol Jul 21, 2023
10220b8
Check that there are 0.8 contracts to build before trying
martinvol Jul 24, 2023
26af04c
nits
martinvol Jul 24, 2023
81ac022
Removed duplicated contracts
martinvol Jul 24, 2023
c12fc99
Attempt to fix conflict by removing library TypedMem
martinvol Jul 24, 2023
7ec94ea
Fixed version
martinvol Jul 24, 2023
c4d28fe
updated versions
martinvol Jul 24, 2023
6de5d05
Made the report look for many artifacts folders, test will still fail…
martinvol Jul 24, 2023
cdd44a7
fixed tests
martinvol Jul 24, 2023
a14e4bd
dry run now works
martinvol Jul 25, 2023
7f0978f
The tooling now works
martinvol Jul 26, 2023
eac63bb
lint
martinvol Jul 26, 2023
7a5574f
fix build error
martinvol Jul 26, 2023
1756e00
builds
martinvol Jul 26, 2023
7fc51ca
Added licence to files
martinvol Jul 26, 2023
7a475b1
comment types
martinvol Jul 26, 2023
028112b
Added broken build script
martinvol Jul 27, 2023
e3e305a
modified contract packages
martinvol Jul 27, 2023
6204e01
wip
martinvol Jul 27, 2023
82a80db
Added truffle file
martinvol Jul 27, 2023
05c2a68
Added back sorted Oracles
martinvol Aug 11, 2023
30f8483
Bytecode removed sortedOracles
martinvol Aug 11, 2023
1bdeb5f
All the commands work
martinvol Aug 11, 2023
e9899f7
Merge branch 'martinvol/isolate-0.8-artifacts' into martinvol/isolate…
martinvol Aug 11, 2023
1ba3785
Generalized the 0.8 as a contract package
martinvol Aug 11, 2023
25aaf88
Generalized types
martinvol Aug 14, 2023
f3db31b
WIP
martinvol Aug 14, 2023
e5b1969
Generalized generateFilesForContractKit
martinvol Aug 14, 2023
0840d42
Fixed type
martinvol Aug 14, 2023
5df485e
Changed paths to match other folder
martinvol Aug 14, 2023
42d0186
PR comments
martinvol Aug 14, 2023
9978943
Lint and truffle config cleanup
martinvol Aug 15, 2023
ced38d6
Cleanup truffle configs
martinvol Aug 15, 2023
05dff1d
Added back ast-cde tests
martinvol Aug 15, 2023
428cfb8
Added back tests and fixed build
martinvol Aug 15, 2023
a6f6c23
cleanup removing comments and console.logs
martinvol Aug 15, 2023
05d6325
Fix migrations
martinvol Aug 15, 2023
385319b
More fix migrations
martinvol Aug 15, 2023
56c862e
deleted duplicated migrations
martinvol Aug 16, 2023
f20e956
Fixed migration and truffle config. Migrations work but need refactor…
martinvol Aug 17, 2023
1582d39
Fixed migrations (need some refactor and clean console.log())
martinvol Aug 18, 2023
1bf8424
Removed old script
martinvol Aug 18, 2023
6f80f84
Try to get it to run on GitHub Actions
martinvol Aug 18, 2023
5db2803
Bumped down resource class to unblock execution
jcortejoso Aug 18, 2023
bf356dd
Migration works and test should run!
martinvol Aug 18, 2023
b5a9ae7
Merge branch 'martinvol/isolate-0.8-artifacts' of github.com:celo-org…
martinvol Aug 21, 2023
3f5ce32
Update packages/protocol/lib/compatibility/ignored-contracts-v9.ts
martinvol Aug 21, 2023
e5245b3
Added comments
martinvol Aug 21, 2023
91f80e6
Merge branch 'martinvol/isolate-0.8-artifacts' of github.com:celo-org…
martinvol Aug 21, 2023
e351e91
tmate session added
pahor167 Aug 22, 2023
1560728
revert of yml
pahor167 Aug 23, 2023
e43fb84
fixes for make release
pahor167 Aug 23, 2023
6695ff9
Merge branch 'martinvol/isolate-0.8-artifacts' of github.com:celo-org…
pahor167 Aug 23, 2023
1b25454
Change trigger configuration
jcortejoso Aug 23, 2023
64a38d0
trigger github build
pahor167 Aug 23, 2023
a88ffa7
Merge branch 'martinvol/isolate-0.8-artifacts' of github.com:celo-org…
pahor167 Aug 23, 2023
eef4c9d
migration fix
pahor167 Aug 23, 2023
11ac20c
cli test fix
pahor167 Aug 23, 2023
c5fec1a
Increase timeout of devchain
pahor167 Aug 23, 2023
ea96b2d
timeout update
pahor167 Aug 24, 2023
249217d
update artifacts folders in old release reports
pahor167 Aug 24, 2023
d5aecda
release report fix 2
pahor167 Aug 24, 2023
505d024
config change
pahor167 Aug 24, 2023
5652c5b
set_block_gas_limit added back
pahor167 Aug 25, 2023
19cd974
change chmod on set_block_gas_limit
pahor167 Aug 25, 2023
6792ded
logging
pahor167 Aug 25, 2023
8629d6f
more logging
pahor167 Aug 25, 2023
16ca3e0
get CI
pahor167 Aug 28, 2023
866890a
tmate again
pahor167 Aug 28, 2023
2a4a2db
tmate 3
pahor167 Aug 28, 2023
b6009ec
revert of tmate
pahor167 Aug 28, 2023
d85cbd8
fix of migration in e2e tests
pahor167 Aug 29, 2023
ec9e309
timeout of Common test
pahor167 Aug 30, 2023
1f911ba
Test fixes
pahor167 Aug 31, 2023
5dba0fc
tests stability fixes
pahor167 Sep 1, 2023
318d57e
log uniswap init code pair hash
pahor167 Sep 1, 2023
94bd124
lint fix
pahor167 Sep 1, 2023
a079076
logging
pahor167 Sep 1, 2023
934b982
Fix for uniswap tests
pahor167 Sep 1, 2023
26644c9
update of signing tools
pahor167 Sep 4, 2023
0de2bab
signing fix
pahor167 Sep 4, 2023
aea3798
Revert "signing fix"
pahor167 Sep 4, 2023
0a3050a
Revert "update of signing tools"
pahor167 Sep 4, 2023
3077556
log deployer
pahor167 Sep 4, 2023
de9c849
extra commit just to try to run the CI
pahor167 Sep 4, 2023
6a802a0
removal of deployer logging
pahor167 Sep 4, 2023
8afc20e
tmate session
pahor167 Sep 5, 2023
c6d1b92
Fixed build so it left artifacts of external dependencies in the bran…
martinvol Sep 6, 2023
0b9a8b0
Change build to use imports
gastonponti Sep 6, 2023
33a0557
Made the CI able to deploy CR10
martinvol Sep 7, 2023
59fc3e6
Merge branch 'martinvol/isolate-0.8-artifacts' of github.com:celo-org…
martinvol Sep 7, 2023
158d38e
stability + verbose logging
pahor167 Sep 7, 2023
3e9df8e
Merge branch 'martinvol/isolate-0.8-artifacts' of github.com:celo-org…
pahor167 Sep 7, 2023
1b27fdc
lint fix
pahor167 Sep 7, 2023
6c3474b
Skiped CIP35 tets
martinvol Sep 14, 2023
a4a9e63
Added issue contractPackages.ts
martinvol Sep 14, 2023
4015dbc
Clarified TODO Uniswap mock
martinvol Sep 14, 2023
539d08b
Added rety for segfault
martinvol Sep 15, 2023
c5a6ef6
Added more comments to uniswap
martinvol Sep 15, 2023
94c8dd5
refactors and comments (may break CI)
martinvol Sep 15, 2023
a5ce242
Merge branch 'martinvol/CR10Release' into martinvol/isolate-0.8-artif…
martinvol Sep 15, 2023
641ce7b
lint
martinvol Sep 15, 2023
b3ae035
Changed revert feehandler.ts
martinvol Sep 15, 2023
4f1367e
Lint, removed console.logs, etc
martinvol Sep 15, 2023
1ddf637
Adding comments and removing leftovers
martinvol Sep 15, 2023
4209dfb
Added link to GitHub issue
martinvol Sep 15, 2023
ecf34d2
Added comment
martinvol Sep 15, 2023
4d93aca
Workflow syntax
jcortejoso Sep 15, 2023
1c67570
Fix workflow
jcortejoso Sep 15, 2023
290180e
test fixtures
pahor167 Sep 15, 2023
81fce1f
lint fix
pahor167 Sep 15, 2023
d73aacf
governance test fixes
pahor167 Sep 15, 2023
491a5d0
lint fixes
pahor167 Sep 15, 2023
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
general-test:
<<: *defaults
# XXX (soloseng): Increased size because this test was hitting the ram limit and failing
resource_class: xlarge
resource_class: large
steps:
- attach_workspace:
at: ~/app
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ on:
push:
branches:
- master
# TODO (soloseng): remove before merge
- pahor/0.8_from_Seb
# TODO(jcortejoso): Replace by pull_request
pull_request_target:
pull_request:
branches:
- master
- martinvol/CR10Release

concurrency:
group: circle-ci-${{ github.ref }}
Expand Down Expand Up @@ -291,7 +289,7 @@ jobs:
# Keeping name short because GitHub UI does not handle long names well
name: ${{ matrix.name }}
runs-on: ["self-hosted", "monorepo-node18"]
timeout-minutes: 60
timeout-minutes: 120
needs: [install-dependencies, lint-checks]
if: |
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
Expand Down Expand Up @@ -351,14 +349,12 @@ jobs:
yarn --cwd packages/protocol build
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 20
if: contains(matrix.command, 'common/') && false
with:
limit-access-to-actor: true
if: false
timeout-minutes: 120
- name: Execute matrix command for test
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
timeout_minutes: 60
max_attempts: 3
command: |
${{ matrix.command }}
Expand Down Expand Up @@ -666,14 +662,14 @@ jobs:
rebuild-package: 'true'
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 20
if: contains(matrix.command, 'ci_test_transfers.sh') && false
timeout-minutes: 120
if: contains(matrix.command, 'ci_test_cip35.sh')
with:
limit-access-to-actor: true
- name: Execute matrix command for test
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
timeout_minutes: 60
max_attempts: 3
command: |
${{ matrix.command }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@
"bignumber.js": "9.0.0"
}
}

2 changes: 1 addition & 1 deletion packages/celotool/src/e2e-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function gethRepositoryFromFlags() {
}

export function getHooks(gethConfig: GethRunConfig) {
return getContext(gethConfig).hooks
return getContext(gethConfig, true).hooks
}

export function getContext(gethConfig: GethRunConfig, verbose: boolean = verboseOutput) {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/releasegold/withdraw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ testWithGanache('releasegold:withdraw cmd', (web3: Web3) => {
test('can withdraw released gold to beneficiary', async () => {
await testLocally(SetLiquidityProvision, ['--contract', contractAddress, '--yesreally'])
// ReleasePeriod of default contract
await timeTravel(100000000, web3)
await timeTravel(300000000, web3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is cherry-picked from master, right @pahor167

const releaseGoldWrapper = new ReleaseGoldWrapper(
kit.connection,
newReleaseGold(web3, contractAddress),
Expand All @@ -47,7 +47,7 @@ testWithGanache('releasegold:withdraw cmd', (web3: Web3) => {
test("can't withdraw the whole balance if there is a cUSD balance", async () => {
await testLocally(SetLiquidityProvision, ['--contract', contractAddress, '--yesreally'])
// ReleasePeriod of default contract
await timeTravel(100000000, web3)
await timeTravel(300000000, web3)
const releaseGoldWrapper = new ReleaseGoldWrapper(
kit.connection,
newReleaseGold(web3, contractAddress),
Expand Down
25 changes: 25 additions & 0 deletions packages/protocol/contractPackages.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
export interface ContractPackage {
path?: string
folderPath?: string
name?: string
contracstFolder?: string
contracts: string[]
proxyContracts?: string[]
truffleConfig?: string
solidityVersion?: string
proxiesPath?: string
}

export const MENTO_PACKAGE: ContractPackage = {
path: 'mento-core',
contracstFolder: 'contracts',
folderPath: 'lib',
name: 'mento',
contracts: [
'Exchange',
Expand All @@ -30,4 +37,22 @@ export const MENTO_PACKAGE: ContractPackage = {
'StableTokenEURProxy',
'StableTokenProxy',
],
truffleConfig: 'truffle-config.js',
}

export const SOLIDITY_08_PACKAGE: ContractPackage = {
path: 'contracts-0.8',
contracstFolder: '',
folderPath: '',
name: '0.8',
proxiesPath: '/', // Proxies are still with 0.8 contracts
contracts: [
// TODO make this automatic?
'GasPriceMinimum',
],
proxyContracts: [
// TODO make this automatic?
'GasPriceMinimumProxy',
],
truffleConfig: 'truffle-config0.8.js',
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ pragma solidity >=0.8.7 <0.8.20;

import "@openzeppelin/contracts8/access/Ownable.sol";

import "./CalledByVm.sol";
import "./Initializable.sol";
import "./interfaces/ICeloVersionedContract.sol";
import "./FixidityLib0.8.sol";
import "./UsingRegistry8.sol";
import "../stability/interfaces/ISortedOracles.sol";
import "../../contracts/common/CalledByVm.sol";
import "../../contracts/common/Initializable.sol";
import "../../contracts/common/interfaces/ICeloVersionedContract.sol";
import "../../contracts/common/FixidityLib.sol";
import "./UsingRegistry.sol";
import "../../contracts/stability/interfaces/ISortedOracles.sol";

/**
* @title Stores and provides gas price minimum for various currencies.
Expand All @@ -17,7 +17,7 @@ contract GasPriceMinimum is
ICeloVersionedContract,
Ownable,
Initializable,
UsingRegistry8,
UsingRegistry,
CalledByVm
{
using FixidityLib for FixidityLib.Fraction;
Expand Down Expand Up @@ -53,7 +53,7 @@ contract GasPriceMinimum is
* @return Patch version of the contract.
*/
function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) {
return (1, 1, 1, 0);
return (1, 2, 0, 0);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.8.0 <0.8.20;

// Note: This is not an exact copy of UsingRegistry or UsingRegistryV2 in the contract's folder
// because Mento's interfaces still don't support Solidity 0.8

import "@openzeppelin/contracts8/access/Ownable.sol";
import "@openzeppelin/contracts8/token/ERC20/IERC20.sol";

import "./interfaces/IRegistry.sol";
import "../../contracts/common/interfaces/IRegistry.sol";

contract UsingRegistry8 is Ownable {
contract UsingRegistry is Ownable {
event RegistrySet(address indexed registryAddress);

// solhint-disable state-visibility
Expand Down
Loading
Loading