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

Merge master in to develop #1085

Merged
merged 22 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1912824
First pass at delegated mining
area Jan 12, 2022
7535456
Fix build
area Jan 13, 2022
80d3631
Update smoke tests, fix griefing possibility
area Jan 13, 2022
3a0efb3
Update function comments, param names
area Jan 13, 2022
2e8f89d
Update test helpers
area Jan 13, 2022
4de37fb
Update tests for new restriction on confirmNewHash
area Jan 13, 2022
586308a
Move tx for confirmNewHash in to Miner
area Jan 14, 2022
b7359e7
Changes following review
area Jan 20, 2022
1d8b861
Changes following review
area Feb 2, 2022
e6b4f92
Merge pull request #1011 from JoinColony/feat/delegated-mining
kronosapiens Feb 2, 2022
b0a5402
Use mining stake not obligation where appropriate
area Feb 3, 2022
1f4d6d9
Deduct mining stake on punishment
area Jan 24, 2022
7c8bbae
Merge pull request #1016 from JoinColony/fix/mining-stake-not-obligation
kronosapiens Feb 5, 2022
479c0e8
First pass at storage layout fixes
area Aug 19, 2022
585012e
First pass at function to recover funds staked in misaligned motions
area Aug 22, 2022
b783f21
Add a first test for ghost motion stake reclaiming
area Aug 24, 2022
c236334
Add upgrade tests to coverage
area Aug 24, 2022
189ed1c
Changes from review
area Aug 26, 2022
87509ce
Add test to check metatransaction nonce value
area Aug 26, 2022
262cbc0
Merge branch 'maint/recover-misalignment-locked-funds' into master-copy
area Aug 26, 2022
f861050
Merge pull request #1084 from JoinColony/master-copy
area Aug 30, 2022
db14ac3
Merge branch 'master' into develop-copy
area Aug 30, 2022
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
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,24 @@ jobs:
root: ./
paths:
- coverage-contracts
test-upgrade-coverage:
<<: *job_common
steps:
- checkout
- <<: *step_restore_cache
- setup_remote_docker:
version: 19.03.13
- <<: *step_pull_solc_docker
- <<: *step_setup_global_packages
- run:
name: "Running upgrade tests with coverage"
command: yarn run test:contracts:upgrade:coverage
environment:
NODE_OPTIONS: --max_old_space_size=4096
- persist_to_workspace:
root: ./
paths:
- coverage-upgrade
test-contracts-extensions-coverage:
<<: *job_common
steps:
Expand Down Expand Up @@ -311,13 +329,16 @@ workflows:
context: dockerhub-credentials
- test-chainid-coverage:
context: dockerhub-credentials
- test-upgrade-coverage:
context: dockerhub-credentials
- check-coverage:
context: dockerhub-credentials
requires:
- test-contracts-coverage
- test-contracts-extensions-coverage
- test-reputation-coverage
- test-chainid-coverage
- test-upgrade-coverage
# nightly:
# triggers:
# - schedule:
Expand Down
39 changes: 39 additions & 0 deletions .solcover.upgrade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const { execSync } = require("child_process");
const log = console.log;

// Copies pre-built token artifacts to .coverage_artifacts/contracts
function provisionTokenContracts(config){
let output;
const provisionColonyToken = `bash ./scripts/provision-token-contracts.sh`;

log('Provisioning ColonyToken contracts...')
output = execSync(provisionColonyToken);
log(output.toString())
}

function getFilesToSkip(){
const array = [
'Migrations.sol',
'common/EtherRouter.sol',
'patriciaTree',
'testHelpers',
];

const output = execSync("ls ./**/*Updated*", {cwd: "./contracts/"});

return array.concat(output.toString().split('\n').slice(0,-1))
}

module.exports = {
skipFiles: getFilesToSkip(),
providerOptions: {
port: 8555,
network_id: 1999,
account_keys_path: "./ganache-accounts.json",
vmErrorsOnRPCResponse: false,
total_accounts: 18
},
onCompileComplete: provisionTokenContracts,
istanbulFolder: "./coverage-upgrade"
}

37 changes: 37 additions & 0 deletions contracts/extensions/IColonyExtension.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
This file is part of The Colony Network.

The Colony Network is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

The Colony Network is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with The Colony Network. If not, see <http://www.gnu.org/licenses/>.
*/

pragma solidity 0.7.3;
pragma experimental ABIEncoderV2;
import "./../common/IBasicMetaTransaction.sol";

interface IColonyExtension is IBasicMetaTransaction {

function identifier() external pure returns (bytes32);
function version() external pure virtual returns (uint256);
function install(address _colony) external virtual;
function finishUpgrade() external virtual;
function deprecate(bool _deprecated) external virtual;
function uninstall() external virtual;

function getCapabilityRoles(bytes4 _sig) external view virtual returns (bytes32);

function getDeprecated() external view returns (bool);

function getColony() external view returns(address);

}
Loading