diff --git a/README.md b/README.md index c2e7cf2..c202c1b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Usage example: - You send 25 DAI to the Compass-EVM contract, specifying which address on the Paloma chain should recieve the synthetic DAI. - Validators on the Paloma blockchain see that this has happened and mint 25 synthetic DAI for the address you specified on the Paloma chain. - You send the 25 synthetic DAI to Jim on the Paloma chain. -- Jim sends the synthetic DAI to Turnstone module on the Paloma blockchain, specifying which Ethereum address should receive it. +- Jim sends the synthetic DAI to Compass module on the Paloma blockchain, specifying which Ethereum address should receive it. - The Paloma validators burn the synthetic DAI on the Paloma blockchain and unlock 25 DAI for Jim on Ethereum ## Security model diff --git a/contracts/Turnstone.vy b/contracts/Compass.vy similarity index 91% rename from contracts/Turnstone.vy rename to contracts/Compass.vy index 277746c..9d2d5bd 100644 --- a/contracts/Turnstone.vy +++ b/contracts/Compass.vy @@ -1,6 +1,6 @@ # @version 0.3.7 """ -@title Turnstone-EVM +@title Compass-EVM @author Volume.Finance """ @@ -9,7 +9,7 @@ MAX_PAYLOAD: constant(uint256) = 20480 MAX_BATCH: constant(uint256) = 64 POWER_THRESHOLD: constant(uint256) = 2_863_311_530 # 2/3 of 2^32, Validator powers will be normalized to sum to 2 ^ 32 in every valset update. -TURNSTONE_ID: immutable(bytes32) +COMPASS_ID: immutable(bytes32) interface ERC20: def balanceOf(_owner: address) -> uint256: view @@ -66,11 +66,11 @@ last_checkpoint: public(bytes32) last_valset_id: public(uint256) message_id_used: public(HashMap[uint256, bool]) -# turnstone_id: unique identifier for turnstone instance +# compass_id: unique identifier for compass instance # valset: initial validator set @external -def __init__(turnstone_id: bytes32, valset: Valset): - TURNSTONE_ID = turnstone_id +def __init__(compass_id: bytes32, valset: Valset): + COMPASS_ID = compass_id cumulative_power: uint256 = 0 i: uint256 = 0 # check cumulative power is enough @@ -80,15 +80,15 @@ def __init__(turnstone_id: bytes32, valset: Valset): break i += 1 assert cumulative_power >= POWER_THRESHOLD, "Insufficient Power" - new_checkpoint: bytes32 = keccak256(_abi_encode(valset.validators, valset.powers, valset.valset_id, turnstone_id, method_id=method_id("checkpoint(address[],uint256[],uint256,bytes32)"))) + new_checkpoint: bytes32 = keccak256(_abi_encode(valset.validators, valset.powers, valset.valset_id, compass_id, method_id=method_id("checkpoint(address[],uint256[],uint256,bytes32)"))) self.last_checkpoint = new_checkpoint self.last_valset_id = valset.valset_id log ValsetUpdated(new_checkpoint, valset.valset_id) @external @pure -def turnstone_id() -> bytes32: - return TURNSTONE_ID +def compass_id() -> bytes32: + return COMPASS_ID # utility function to verify EIP712 signature @internal @@ -116,13 +116,13 @@ def check_validator_signatures(consensus: Consensus, hash: bytes32): # A checkpoint is a hash of all relevant information about the valset. This is stored by the contract, # instead of storing the information directly. This saves on storage and gas. # The format of the checkpoint is: -# keccak256 hash of abi_encoded checkpoint(validators[], powers[], valset_id, turnstone_id) +# keccak256 hash of abi_encoded checkpoint(validators[], powers[], valset_id, compass_id) # The validator powers must be decreasing or equal. This is important for checking the signatures on the # next valset, since it allows the caller to stop verifying signatures once a quorum of signatures have been verified. @internal @view def make_checkpoint(valset: Valset) -> bytes32: - return keccak256(_abi_encode(valset.validators, valset.powers, valset.valset_id, TURNSTONE_ID, method_id=method_id("checkpoint(address[],uint256[],uint256,bytes32)"))) + return keccak256(_abi_encode(valset.validators, valset.powers, valset.valset_id, COMPASS_ID, method_id=method_id("checkpoint(address[],uint256[],uint256,bytes32)"))) # This updates the valset by checking that the validators in the current valset have signed off on the # new valset. The signatures supplied are the signatures of the current valset over the checkpoint hash @@ -163,8 +163,8 @@ def submit_logic_call(consensus: Consensus, args: LogicCallArgs, message_id: uin self.message_id_used[message_id] = True # check if the supplied current validator set matches the saved checkpoint assert self.last_checkpoint == self.make_checkpoint(consensus.valset), "Incorrect Checkpoint" - # signing data is keccak256 hash of abi_encoded logic_call(args, message_id, turnstone_id, deadline) - args_hash: bytes32 = keccak256(_abi_encode(args, message_id, TURNSTONE_ID, deadline, method_id=method_id("logic_call((address,bytes),uint256,bytes32,uint256)"))) + # signing data is keccak256 hash of abi_encoded logic_call(args, message_id, compass_id, deadline) + args_hash: bytes32 = keccak256(_abi_encode(args, message_id, COMPASS_ID, deadline, method_id=method_id("logic_call((address,bytes),uint256,bytes32,uint256)"))) # check if enough validators signed args_hash self.check_validator_signatures(consensus, args_hash) # make call to logic contract @@ -212,8 +212,8 @@ def submit_batch(consensus: Consensus, token: address, args: TokenSendArgs, mess self.message_id_used[message_id] = True # check if the supplied current validator set matches the saved checkpoint assert self.last_checkpoint == self.make_checkpoint(consensus.valset), "Incorrect Checkpoint" - # signing data is keccak256 hash of abi_encoded logic_call(args, message_id, turnstone_id, deadline) - args_hash: bytes32 = keccak256(_abi_encode(token, args, message_id, TURNSTONE_ID, deadline, method_id=method_id("batch_call(address,(address[],uint256[]),uint256,bytes32,uint256)"))) + # signing data is keccak256 hash of abi_encoded logic_call(args, message_id, compass_id, deadline) + args_hash: bytes32 = keccak256(_abi_encode(token, args, message_id, COMPASS_ID, deadline, method_id=method_id("batch_call(address,(address[],uint256[]),uint256,bytes32,uint256)"))) # check if enough validators signed args_hash self.check_validator_signatures(consensus, args_hash) # make call to logic contract diff --git a/scripts/deploy.py b/scripts/deploy.py index 1444b38..8a5973b 100644 --- a/scripts/deploy.py +++ b/scripts/deploy.py @@ -1,4 +1,4 @@ -from brownie import accounts, Turnstone +from brownie import accounts, Compass from eth_abi import encode_abi def main(): @@ -6,5 +6,5 @@ def main(): validators = [] # should update powers = [] # should update valset_id = 0 # should update - turnstone_id = b"ETH_01" # should update - Turnstone.deploy(encode_abi(["bytes32"], [turnstone_id]), [validators, powers, valset_id],{"from": acct}) \ No newline at end of file + compass_id = b"ETH_01" # should update + Compass.deploy(encode_abi(["bytes32"], [compass_id]), [validators, powers, valset_id],{"from": acct}) \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index becc555..2b3b0e1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,14 +1,14 @@ #!/usr/bin/python3 import pytest -from brownie import accounts, Turnstone, TestERC20, web3 +from brownie import accounts, Compass, TestERC20, web3 from eth_abi import encode_abi from eth_account import Account from eth_account.messages import encode_defunct @pytest.fixture -def TurnstoneContract(validators, powers): - return Turnstone.deploy(bstring2bytes32(b"ETH_01"), [validators, powers, 0], {"from": accounts[0]}) +def CompassContract(validators, powers): + return Compass.deploy(bstring2bytes32(b"ETH_01"), [validators, powers, 0], {"from": accounts[0]}) @pytest.fixture def TestERC20Contract(): diff --git a/tests/test_deploy.py b/tests/test_deploy.py index ee0fade..4e5f0ed 100644 --- a/tests/test_deploy.py +++ b/tests/test_deploy.py @@ -4,5 +4,5 @@ from conftest import * -def test_deploy(TurnstoneContract): - assert TurnstoneContract.turnstone_id().decode("utf8") == "ETH_01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" +def test_deploy(CompassContract): + assert CompassContract.compass_id().decode("utf8") == "ETH_01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" diff --git a/tests/test_submit_logic_call.py b/tests/test_submit_logic_call.py index 525bdbd..581a622 100644 --- a/tests/test_submit_logic_call.py +++ b/tests/test_submit_logic_call.py @@ -5,8 +5,8 @@ from conftest import * from brownie.network.state import Chain -def test_submit_logic_call_success(TurnstoneContract, TestERC20Contract, validators, powers, accounts): - TestERC20Contract.transfer(TurnstoneContract, 10 ** 18, {"from": accounts[0]}) +def test_submit_logic_call_success(CompassContract, TestERC20Contract, validators, powers, accounts): + TestERC20Contract.transfer(CompassContract, 10 ** 18, {"from": accounts[0]}) transfer_amount = 5 * 10 ** 17 func_sig = function_signature("transfer(address,uint256)") enc_abi = encode_abi(["address", "uint256"], [accounts[1].address, transfer_amount]) @@ -14,18 +14,18 @@ def test_submit_logic_call_success(TurnstoneContract, TestERC20Contract, validat message_id = 1000 valset_id = 0 func_sig = function_signature("logic_call((address,bytes),uint256,bytes32,uint256)") - turnstone_id = bstring2bytes32(b"ETH_01") - enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, turnstone_id, 2 ** 256 - 1]) + compass_id = bstring2bytes32(b"ETH_01") + enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, compass_id, 2 ** 256 - 1]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, 2 ** 256 - 1, {"from": accounts[0]} ) assert TestERC20Contract.balanceOf(accounts[1]) == transfer_amount -def test_submit_logic_call_timeout_revert(TurnstoneContract, TestERC20Contract, validators, powers, accounts): - TestERC20Contract.transfer(TurnstoneContract, 10 ** 18, {"from": accounts[0]}) +def test_submit_logic_call_timeout_revert(CompassContract, TestERC20Contract, validators, powers, accounts): + TestERC20Contract.transfer(CompassContract, 10 ** 18, {"from": accounts[0]}) transfer_amount = 5 * 10 ** 17 func_sig = function_signature("transfer(address,uint256)") enc_abi = encode_abi(["address", "uint256"], [accounts[1].address, transfer_amount]) @@ -35,18 +35,18 @@ def test_submit_logic_call_timeout_revert(TurnstoneContract, TestERC20Contract, chain = Chain() timestamp = chain.time() func_sig = function_signature("logic_call((address,bytes),uint256,bytes32,uint256)") - turnstone_id = bstring2bytes32(b"ETH_01") - enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, turnstone_id, timestamp - 1]) + compass_id = bstring2bytes32(b"ETH_01") + enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, compass_id, timestamp - 1]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) with brownie.reverts("Timeout"): - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, timestamp - 1, {"from": accounts[0]} ) -def test_submit_logic_call_used_message_id_revert(TurnstoneContract, TestERC20Contract, validators, powers, accounts): - TestERC20Contract.transfer(TurnstoneContract, 10 ** 18, {"from": accounts[0]}) +def test_submit_logic_call_used_message_id_revert(CompassContract, TestERC20Contract, validators, powers, accounts): + TestERC20Contract.transfer(CompassContract, 10 ** 18, {"from": accounts[0]}) transfer_amount = 5 * 10 ** 17 func_sig = function_signature("transfer(address,uint256)") enc_abi = encode_abi(["address", "uint256"], [accounts[1].address, transfer_amount]) @@ -54,22 +54,22 @@ def test_submit_logic_call_used_message_id_revert(TurnstoneContract, TestERC20Co message_id = 1000 valset_id = 0 func_sig = function_signature("logic_call((address,bytes),uint256,bytes32,uint256)") - turnstone_id = bstring2bytes32(b"ETH_01") - enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, turnstone_id, 2 ** 256 - 1]) + compass_id = bstring2bytes32(b"ETH_01") + enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, compass_id, 2 ** 256 - 1]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, 2 ** 256 - 1, {"from": accounts[0]} ) with brownie.reverts("Used Message_ID"): - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, 2 ** 256 - 1, {"from": accounts[0]} ) -def test_submit_logic_call_incorrect_checkpoint_revert(TurnstoneContract, TestERC20Contract, validators, powers, accounts): - TestERC20Contract.transfer(TurnstoneContract, 10 ** 18, {"from": accounts[0]}) +def test_submit_logic_call_incorrect_checkpoint_revert(CompassContract, TestERC20Contract, validators, powers, accounts): + TestERC20Contract.transfer(CompassContract, 10 ** 18, {"from": accounts[0]}) transfer_amount = 5 * 10 ** 17 func_sig = function_signature("transfer(address,uint256)") enc_abi = encode_abi(["address", "uint256"], [accounts[1].address, transfer_amount]) @@ -77,19 +77,19 @@ def test_submit_logic_call_incorrect_checkpoint_revert(TurnstoneContract, TestER message_id = 1000 valset_id = 0 func_sig = function_signature("logic_call((address,bytes),uint256,bytes32,uint256)") - turnstone_id = bstring2bytes32(b"ETH_01") - enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, turnstone_id, 2 ** 256 - 1]) + compass_id = bstring2bytes32(b"ETH_01") + enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, compass_id, 2 ** 256 - 1]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) powers[0] -= 1 with brownie.reverts("Incorrect Checkpoint"): - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, 2 ** 256 - 1, {"from": accounts[0]} ) -def test_submit_logic_call_invalid_signature(TurnstoneContract, TestERC20Contract, validators, powers, accounts): - TestERC20Contract.transfer(TurnstoneContract, 10 ** 18, {"from": accounts[0]}) +def test_submit_logic_call_invalid_signature(CompassContract, TestERC20Contract, validators, powers, accounts): + TestERC20Contract.transfer(CompassContract, 10 ** 18, {"from": accounts[0]}) transfer_amount = 5 * 10 ** 17 func_sig = function_signature("transfer(address,uint256)") enc_abi = encode_abi(["address", "uint256"], [accounts[1].address, transfer_amount]) @@ -97,19 +97,19 @@ def test_submit_logic_call_invalid_signature(TurnstoneContract, TestERC20Contrac message_id = 1000 valset_id = 0 func_sig = function_signature("logic_call((address,bytes),uint256,bytes32,uint256)") - turnstone_id = bstring2bytes32(b"ETH_01") - enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, turnstone_id, 2 ** 256 - 1]) + compass_id = bstring2bytes32(b"ETH_01") + enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, compass_id, 2 ** 256 - 1]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) sigs[0][0] = 1 with brownie.reverts("Invalid Signature"): - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, 2 ** 256 - 1, {"from": accounts[0]} ) -def test_submit_logic_call_insufficient_power(TurnstoneContract, TestERC20Contract, validators, powers, accounts): - TestERC20Contract.transfer(TurnstoneContract, 10 ** 18, {"from": accounts[0]}) +def test_submit_logic_call_insufficient_power(CompassContract, TestERC20Contract, validators, powers, accounts): + TestERC20Contract.transfer(CompassContract, 10 ** 18, {"from": accounts[0]}) transfer_amount = 5 * 10 ** 17 func_sig = function_signature("transfer(address,uint256)") enc_abi = encode_abi(["address", "uint256"], [accounts[1].address, transfer_amount]) @@ -117,14 +117,14 @@ def test_submit_logic_call_insufficient_power(TurnstoneContract, TestERC20Contra message_id = 1000 valset_id = 0 func_sig = function_signature("logic_call((address,bytes),uint256,bytes32,uint256)") - turnstone_id = bstring2bytes32(b"ETH_01") - enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, turnstone_id, 2 ** 256 - 1]) + compass_id = bstring2bytes32(b"ETH_01") + enc_abi = encode_abi(["(address,bytes)", "uint256", "bytes32", "uint256"], [[TestERC20Contract.address, payload], message_id, compass_id, 2 ** 256 - 1]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) sigs[0][0] = 0 sigs[1][0] = 0 with brownie.reverts("Insufficient Power"): - TurnstoneContract.submit_logic_call( + CompassContract.submit_logic_call( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, valset_id], sigs], [TestERC20Contract, payload], message_id, 2 ** 256 - 1, {"from": accounts[0]} ) \ No newline at end of file diff --git a/tests/test_update_valset.py b/tests/test_update_valset.py index a324356..3b4aeb9 100644 --- a/tests/test_update_valset.py +++ b/tests/test_update_valset.py @@ -4,33 +4,33 @@ from conftest import * -def test_update_valset_success(TurnstoneContract, validators, powers, accounts): +def test_update_valset_success(CompassContract, validators, powers, accounts): func_sig = function_signature("checkpoint(address[],uint256[],uint256,bytes32)") new_valset_id = 1 enc_abi = encode_abi(["address[]","uint256[]","uint256","bytes32"], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id, bstring2bytes32(b"ETH_01")]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) - TurnstoneContract.update_valset( + CompassContract.update_valset( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, 0], sigs], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id], {"from": accounts[0]} ) - assert TurnstoneContract.last_checkpoint() == hash.hex() + assert CompassContract.last_checkpoint() == hash.hex() -def test_update_valset_invalid_valset_id_revert(TurnstoneContract, validators, powers, accounts): +def test_update_valset_invalid_valset_id_revert(CompassContract, validators, powers, accounts): func_sig = function_signature("checkpoint(address[],uint256[],uint256,bytes32)") new_valset_id = 0 enc_abi = encode_abi(["address[]","uint256[]","uint256","bytes32"], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id, bstring2bytes32(b"ETH_01")]) hash = web3.keccak(func_sig + enc_abi) sigs = sign_hash(validators, hash) with brownie.reverts("Invalid Valset ID"): - TurnstoneContract.update_valset( + CompassContract.update_valset( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, 0], sigs], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id], {"from": accounts[0]} ) -def test_update_valset_invalid_signature_revert(TurnstoneContract, validators, powers, accounts): +def test_update_valset_invalid_signature_revert(CompassContract, validators, powers, accounts): func_sig = function_signature("checkpoint(address[],uint256[],uint256,bytes32)") new_valset_id = 1 enc_abi = encode_abi(["address[]","uint256[]","uint256","bytes32"], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id, bstring2bytes32(b"ETH_01")]) @@ -38,13 +38,13 @@ def test_update_valset_invalid_signature_revert(TurnstoneContract, validators, p sigs = sign_hash(validators, hash) sigs[0][0] = 1 with brownie.reverts("Invalid Signature"): - TurnstoneContract.update_valset( + CompassContract.update_valset( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, 0], sigs], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id + 1], {"from": accounts[0]} ) -def test_update_valset_incorrect_checkpoint_revert(TurnstoneContract, validators, powers, accounts): +def test_update_valset_incorrect_checkpoint_revert(CompassContract, validators, powers, accounts): func_sig = function_signature("checkpoint(address[],uint256[],uint256,bytes32)") new_valset_id = 1 enc_abi = encode_abi(["address[]","uint256[]","uint256","bytes32"], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id, bstring2bytes32(b"ETH_01")]) @@ -52,13 +52,13 @@ def test_update_valset_incorrect_checkpoint_revert(TurnstoneContract, validators sigs = sign_hash(validators, hash) powers[0] += 1 with brownie.reverts("Incorrect Checkpoint"): - TurnstoneContract.update_valset( + CompassContract.update_valset( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, 0], sigs], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id], {"from": accounts[0]} ) -def test_update_valset_insufficient_power_revert(TurnstoneContract, validators, powers, accounts): +def test_update_valset_insufficient_power_revert(CompassContract, validators, powers, accounts): func_sig = function_signature("checkpoint(address[],uint256[],uint256,bytes32)") new_valset_id = 1 enc_abi = encode_abi(["address[]","uint256[]","uint256","bytes32"], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id, bstring2bytes32(b"ETH_01")]) @@ -67,7 +67,7 @@ def test_update_valset_insufficient_power_revert(TurnstoneContract, validators, sigs[0][0] = 0 sigs[1][0] = 0 with brownie.reverts("Insufficient Power"): - TurnstoneContract.update_valset( + CompassContract.update_valset( [[[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, 0], sigs], [[validators[0].address, validators[1].address, validators[2].address, validators[3].address], powers, new_valset_id], {"from": accounts[0]}