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

Migrate HardHat tests to DS-tests (Solidity tests) #601

Merged
merged 24 commits into from
May 23, 2023

Conversation

richardpringle
Copy link
Contributor

@richardpringle richardpringle commented Apr 3, 2023

Why this should be merged

It's the first big step in the direction of solving some of the security vulnerabilities related to using hardhat and other node-modules.

How this works

Currently, HardHat is still used to run the test, but all the logic is in Solidity

How this was tested

Example of passing test:
https://github.com/ava-labs/subnet-evm/actions/runs/4600753486/jobs/8127753059?pr=601#step:8:259

Next Steps

Once all the tests have been migrated over to solidity, we have a couple of options for removing hardhat. We can use forge to build all the solidity, then use ethers directly to deploy.

EthersJS has the following dependencies

root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ yarn info ethers dependencies
yarn info v1.22.19
{
  '@adraffy/ens-normalize': '1.9.0',
  '@noble/hashes': '1.1.2',
  '@noble/secp256k1': '1.7.1',
  'aes-js': '4.0.0-beta.3',
  tslib: '2.4.0',
  ws: '8.5.0'
}

all of which have no other dependencies

root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ npm view @adraffy/ens-normalize dependencies
root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ npm view @noble/hashes dependencies
root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ npm view aes-js dependencies
root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ npm view tslib dependencies
root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ npm view ws dependencies
root ➜ /com.docker.devenvironments.code/contract-examples (master ✗) $ 

We would still be dependent on NodeJS and mocha. While mocha still has quite a few dependencies, it is one of the most used libraries in the NodeJS ecosystem and should come up in an npm audit...

Speaking of npm audit, we should definitely be running that (there are a lot of vulnerabilities in the current dependency tree).

From there, I think it's worth evaluating whether or not we should remove the JS dependency entirely, and I'm not sure that it is.

closes #223

@aaronbuchwald
Copy link
Collaborator

Discussed offline, this looks like a good plan to me to:

  • Migrate the testing logic to use DSTest
  • Deploy/call test contracts from HardHat
  • Migrate to deploy/call test contracts from Golang to remove npm/JS

@aaronbuchwald
Copy link
Collaborator

Code and plan looks good to me so far 👍

@richardpringle richardpringle force-pushed the migrate-hardhat-to-ds-test branch 2 times, most recently from ce15f7c to b350c7e Compare April 18, 2023 18:03
Copy link
Collaborator

@darioush darioush left a comment

Choose a reason for hiding this comment

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

partial review, could we:

  • remove the redundant tests in a separate PR
  • fix the addDeployer issue that exists in the current tests?

this way this PR can be reviewed side by side and we can start removing the it.skip directives.

contract-examples/contracts/ExampleFeeManager.sol Outdated Show resolved Hide resolved
expect(role).to.be.equal(ROLES.NONE)
})
// this is testing something that is setup in the before hook
// I don't really understand why...
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we assert this in the setup instead of having a test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think adding assertions to the setUp functions would make for very clear errors. If for whatever reason the deployer was not setup as an admin properly, most of the tests would fail and it should be clear-ish that something is seriously wrong.

I don't have a super strong opinion here though, if you think I should add error-logging (for assertions) to the setUp block, I can do that.


// this isn't really testing the functionality of the precompile but instead testing if the genesis config
// set things up as expected.
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should still have e2e test for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Is there no better place to test this functionality, though? Are we not testing the rest of the genesis stuff somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

// if !txAllowListRole.IsEnabled() {
// return fmt.Errorf("%w: %s", vmerrs.ErrSenderAddressNotAllowListed, st.msg.From())
// }
// }
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should still have e2e test for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

contract-examples/test/contract_deployer_allow_list.ts Outdated Show resolved Hide resolved
contract-examples/contracts/ExampleFeeManager.sol Outdated Show resolved Hide resolved
contract-examples/contracts/ExampleFeeManager.sol Outdated Show resolved Hide resolved
@richardpringle richardpringle force-pushed the migrate-hardhat-to-ds-test branch 4 times, most recently from 1c79635 to 014e310 Compare April 25, 2023 01:05
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

looks good 👍 .
just a file rename comment.

contract-examples/contracts/ERC20NativeMinter.sol Outdated Show resolved Hide resolved
contract-examples/contracts/test/AllowList.sol Outdated Show resolved Hide resolved
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

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

some similar patterns in other tests
#601 (comment)

}

function step_verifySenderIsAdmin() public {
IAllowList allowList = IAllowList(DEPLOYER_LIST);
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar pattern here with: #601 (comment)

function step_enableWAGMIFeesFailure() public {
ExampleFeeManager example = new ExampleFeeManager();

IFeeManager manager = IFeeManager(FEE_MANAGER_ADDRESS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar pattern here with: #601 (comment)

function step_doesNotSetRewardAddressBeforeEnabled() public {
ExampleRewardManager example = new ExampleRewardManager();
address exampleAddress = address(example);
IRewardManager rewardManager = IRewardManager(REWARD_MANAGER_ADDRESS);
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar pattern here with: #601 (comment)

}

function step_precompileHasDeployerAsAdmin() public {
IAllowList allowList = IAllowList(TX_ALLOW_LIST);
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar pattern here with: #601 (comment)

@richardpringle
Copy link
Contributor Author

@ceyonur

some similar patterns in other tests #601 (comment)

Applying the pattern right now, but consider this scenario:

You have a failing test, and the step_ function is at the bottom of the contract. I have to scroll up to the top to see what rewardManager is (for example). I find that in tests, it's actually preferable and more flexible not to follow DRY principles and instead of overly explicit where possible. Tests are not part of a greater system, and each test should be able to pass on its own; therefore, repetition is okay. Just wanted to share my opinion.

@ceyonur
Copy link
Collaborator

ceyonur commented May 18, 2023

@ceyonur

some similar patterns in other tests #601 (comment)

Applying the pattern right now, but consider this scenario:

You have a failing test, and the step_ function is at the bottom of the contract. I have to scroll up to the top to see what rewardManager is (for example). I find that in tests, it's actually preferable and more flexible not to follow DRY principles and instead of overly explicit where possible. Tests are not part of a greater system, and each test should be able to pass on its own; therefore, repetition is okay. Just wanted to share my opinion.

I don't have a strong opinion on this one. I agree that tests should be explicit as possible. I just feel like calling the precompile should be done once in each contract/test. In both cases we should be consistent amongst test files, so just wanted to make sure we follow same approach in every test file. Thanks for working on this one.

@@ -5,11 +5,12 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./AllowList.sol";
import "./INativeMinter.sol";

address constant MINTER_ADDRESS = 0x0200000000000000000000000000000000000001;
address constant BLACKHOLE_ADDRESS = 0x0100000000000000000000000000000000000000;

contract ERC20NativeMinter is ERC20, AllowList {
// Precompiled Native Minter Contract Address
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we move the comments to the place of the new declarations?

@@ -13,6 +13,12 @@ contract AllowList is Ownable {
uint256 constant STATUS_ENABLED = 1;
uint256 constant STATUS_ADMIN = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we remove these in favor of the new enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can do that in a new PR... Otherwise, this PR will never get over the line.

Originally, I didn't want some weird intermediate state with half JS tests and half Solidity tests, but in hindsight, that was a mistake.

})

});
beforeEach('Setup DS-Test contract', async function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it better for this to be beforeEach or before? not sure which one we'd prefer.
It seems some of the tests must be run in order so not sure having independent test setup is preferable in these tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to make it so the tests do not need to be run in order. Before this PR, they all needed to be run in a specific order, and most could not be run in isolation, which is a bad testing practice. I believe I have run every single one of these tests in isolation, the only thing I did not test is if you could run them out of order, but I think that's more effort to verify than it's worth.

Also, DS-Test will set its own state to failed once it fails a single test. You should still be able to see what other tests pass/fail when a single test fails. Tests in general should be independent.

@@ -4,9 +4,11 @@ pragma solidity ^0.8.0;
import "./IRewardManager.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

address constant REWARD_MANAGER_ADDRESS = 0x0200000000000000000000000000000000000004;
address constant BLACKHOLE_ADDRESS = 0x0100000000000000000000000000000000000000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we keep the consts only used in tests in the test file?

uint initialTokenBalance = token.balanceOf(minterAddress);
uint initialNativeBalance = minterAddress.balance;

assertRole(initialTokenBalance, AllowList.Role.None);
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this assertion be checking the Role against expected role and initial balance with 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wow... good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I meant to be checking the balance. Changing this to assertRole was the result of a search and replace whose search params were a little too wide, apparently.


minter.mintdraw(amount);

assertRole(token.balanceOf(minterAddress), AllowList.Role.None);
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

uint amount = 100;

uint initialNativeBalance = minterAddress.balance;
assertRole(initialNativeBalance, AllowList.Role.None);
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above

contract-examples/test/contract_native_minter.ts Outdated Show resolved Hide resolved
import "../INativeMinter.sol";
import "./AllowListTest.sol";

// TODO:
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1 for stripping this down to only the testing logic

@aaronbuchwald
Copy link
Collaborator

It looks like this PR increases the time that the e2e tests take from about 5min to 11min in CI and about 200s to 600s running locally on my computer.

This seems to come from the fact that the tests are completing more total transactions now that it's re-deploying the contract and calling setup for each test.

@aaronbuchwald
Copy link
Collaborator

Modified tests to confirm they fail as expected and got this great ouput:

Combined output:

Compiling 1 file with 0.8.0
Compilation finished successfully


  ExampleDeployerList
    ✓ precompile should see owner address has admin role (4056ms)

Error: a == b not satisfied [uint]
      Left
BigNumber { value: "1" }
     Right
BigNumber { value: "0" }

    1) precompile should see test address has no role
    ✓ contract should report test address has no admin role (4051ms)
    ✓ contract should report owner address has admin role (4047ms)
    ✓ should not let test address deploy (4084ms)

Error: Assertion Failed

    2) should allow admin to add contract as admin
    ✓ should allow admin to add deployer address as deployer through contract (4049ms)
    ✓ should let deployer address to deploy (4053ms)
    ✓ should let admin revoke deployer (4067ms)


  7 passing (2m)
  2 failing

  1) ExampleDeployerList
       precompile should see test address has no role:

      AssertionError [ERR_ASSERTION]: step_newAddressHasNoRole failed
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/utils.ts:123:9)
      at step (test/utils.ts:33:23)
      at Object.next (test/utils.ts:14:53)
      at fulfilled (test/utils.ts:5:58)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)

  2) ExampleDeployerList
       should allow admin to add contract as admin:

      AssertionError [ERR_ASSERTION]: step_adminAddContractAsAdmin failed
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/utils.ts:123:9)
      at step (test/utils.ts:33:23)
      at Object.next (test/utils.ts:14:53)
      at fulfilled (test/utils.ts:5:58)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)





Err: exit status 2
  [FAILED] Expected
      <*exec.ExitError | 0xc001182000>: {
          ProcessState: {
              pid: 54074,
              status: 512,
              rusage: {
                  Utime: {
                      Sec: 7,
                      Usec: 863281,
                      Pad_cgo_0: [0, 0, 0, 0],
                  },
                  Stime: {
                      Sec: 0,
                      Usec: 806771,
                      Pad_cgo_0: [0, 0, 0, 0],
                  },
                  Maxrss: 322871296,
                  Ixrss: 0,
                  Idrss: 0,
                  Isrss: 0,
                  Minflt: 161476,
                  Majflt: 15,
                  Nswap: 0,
                  Inblock: 0,
                  Oublock: 0,
                  Msgsnd: 676,
                  Msgrcv: 675,
                  Nsignals: 2,
                  Nvcsw: 1554,
                  Nivcsw: 13148,
              },
          },
          Stderr: nil,
      }
  to be nil
  In [It] at: /Users/aaronbuchwald/go/src/github.com/ava-labs/subnet-evm/tests/utils/subnet.go:46 @ 05/23/23 16:37:04.524
  < Exit [It] contract deployer allow list - /Users/aaronbuchwald/go/src/github.com/ava-labs/subnet-evm/tests/precompile/solidity/suites.go:43 @ 05/23/23 16:37:04.524 (1m57.465s)
• [FAILED] [117.465 seconds]

Copy link
Collaborator

@aaronbuchwald aaronbuchwald left a comment

Choose a reason for hiding this comment

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

LGTM once @darioush approves

@aaronbuchwald aaronbuchwald merged commit 5fb165f into master May 23, 2023
@aaronbuchwald aaronbuchwald deleted the migrate-hardhat-to-ds-test branch May 23, 2023 20:51
atvanguard added a commit to hubble-exchange/hubblenet that referenced this pull request Aug 4, 2023
* Rename test_ to step_ for clarity (ava-labs#636)

* Codeowners fix (specific dir overrides global) (ava-labs#639)

* rename state upgrade test (ava-labs#641)

* plugin/evm: fix godoc typo (ava-labs#647)

Signed-off-by: Gyuho Lee <gyuho.lee@avalabs.org>

* plugin/evm: remove unncessary tx.Hash op in map iter (ava-labs#648)

Signed-off-by: Gyuho Lee <gyuho.lee@avalabs.org>

* deployExampleRewardManager.ts hardhat script fixed (ava-labs#650)

* Migrate HardHat tests to DS-tests (Solidity tests) (ava-labs#601)

* Increase trie dirty default cache size to 512MB (ava-labs#656)

* export gingkgo suites (ava-labs#659)

* export gingkgo suites

* remove precompiles description from ping tests

* update package.json

* fix url in package json

* change package name

* Publish npm module for contract-examples (ava-labs#663)

* export gingkgo suites

* remove precompiles description from ping tests

* update package.json

* fix url in package json

* change package name

* prepare for module publishing

* use npm ci

* preload ethers

* nits

* Fix broken path to docs in README. (ava-labs#665)

* Fix contract examples package json (ava-labs#672)

* rename contract-examples to contracts & fix pack issue

* allow custom CMD to be run on blockchains for e2e tests

* move default hardhat test to utils

* fix comment

* add more comments

* change folder reference

* Bump got and ethereum-waffle in /contracts (ava-labs#680)

Removes [got](https://github.com/sindresorhus/got). It's no longer used after updating ancestor dependency [ethereum-waffle](https://github.com/EthWorks/Waffle). These dependencies need to be updated together.


Removes `got`

Updates `ethereum-waffle` from 3.4.4 to 4.0.10
- [Release notes](https://github.com/EthWorks/Waffle/releases)
- [Commits](https://github.com/EthWorks/Waffle/compare/ethereum-waffle@3.4.4...ethereum-waffle@4.0.10)

---
updated-dependencies:
- dependency-name: got
  dependency-type: indirect
- dependency-name: ethereum-waffle
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump flat and hardhat in /contracts (ava-labs#679)

Bumps [flat](https://github.com/hughsk/flat) to 5.0.2 and updates ancestor dependency [hardhat](https://github.com/nomiclabs/hardhat). These dependencies need to be updated together.


Updates `flat` from 4.1.1 to 5.0.2
- [Commits](hughsk/flat@4.1.1...5.0.2)

Updates `hardhat` from 2.6.1 to 2.15.0
- [Release notes](https://github.com/nomiclabs/hardhat/releases)
- [Commits](https://github.com/nomiclabs/hardhat/compare/hardhat-core-v2.6.1...hardhat@2.15.0)

---
updated-dependencies:
- dependency-name: flat
  dependency-type: indirect
- dependency-name: hardhat
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix core benchmarks (ava-labs#697)

* remove unused line in test (ava-labs#695)

* bump version to v0.5.2 (ava-labs#681)

* bump version to v0.5.2

* downgrade avalanchego to 1.10.2

* update compatibility

* Remove unused ethereum-waffle and ethereumjs-tx pkgs (ava-labs#685)

* move state upgrade related functions to own file (ava-labs#684)

* Update load test to use ANR for network setup (ava-labs#579)

* Update load test to use ANR for network setup

* Remove ToWebsocketURI that relies on strings feature added in go1.20

* Update load test to use ENV var from CI if populated

* Move env var logic into NewDefaultANRConfig

* Add init functions and clean up comments

* Remove unnecessary helper

* Remove unneeded cmd

* Cleanup

* Address PR comments

* Move 2 min timeout for SetupNetwork to the start of the function

* Turn list of txs into tx sequence (ava-labs#683)

* Turn list of txs into tx sequence

* Add agent comments

* Remove unused code and address comments

* add some more comments

* address more comments'

* lint

* Remove :::warning

---------

Co-authored-by: Anusha <anushachillara@gmail.com>

* Minor simulator fixes (ava-labs#703)

* add benchmark to template (ava-labs#705)

* add benchmark to template

* fix comment

* Add metrics for gas price / usage (ava-labs#700)

Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com>

* added config setting to prune warpdb (ava-labs#702)

* added config setting to prune warpdb

* refactored warp prune uint test

* message

* fixed up nits

* fixed nits

* fixed nits

* Update plugin/evm/config.go

* Add wrapped validator state for primary to subnet warp messages (ava-labs#708)

* Add wrapped validator state for primary to subnet warp message verification

* Address PR comment

* upload network runner artifact after e2e test run (ava-labs#709)

* Differentiate mandatory/optional Subnet-EVM Network Upgrades (ava-labs#640)

* remove network upgrades from upgrade configs and enforce them in vm init

* fix tests

* remove unused var

* remove extra shutdown

* copy test chain config when modify

* use SimulatedTestChainConfig for simulated tests

* copy modified test chain config

* add optional upgrades

* Add tests

* fix comments

* use unmarshal in test

* unexport functions

* add commented out test

* add TODO comment

* add blockchain.Stop as defer to test (ava-labs#714)

Co-authered-by: najeal <haim.nathan@icloud.com>
Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org>

* Add support for predicate gas into IntrinsicGas (ava-labs#713)

* Add support for predicate gas

* Address review

* Fix test and add test for PredicateGas

* Address comments

* Add signature aggregation helpers (ava-labs#711)

* Add signature aggregation helpers

* Fix

* Move WarpQuorumDenominator into new file

* Address comments

* fix var rename

* Improve comments

* Address comments

* Add predicate packing helper (ava-labs#710)

* Add predicate packing helper

* move predicate code and add readme

* fix moved import

* fix merge

* Run ginkgo precompile tests in parallel (ava-labs#712)

Use SynchronizedBeforeSuite to create the node and all the subnet that are
needed to run tests. Pass the blockchainID to each work processor and run the
tests in parallel to reduce runtime

* Fix BlockContext comment (ava-labs#731)

* precompile accepter should take logIdx (ava-labs#728)

* precompile accepter should take logIdx

* minimize mock

* copyright yr

* add comments

* Improve tests (ava-labs#733)

Improve tests based on feedback from ava-labs#712

* Fix precompile test gen template (ava-labs#737)

* fix Benchmark

* fix spelling/references in Benchmark

* Clean up gossip (ava-labs#744)

* Remove call from precompile (ava-labs#748)

* Fix nil types tmpl (ava-labs#751)

* add more nil types and fix int types

* readd hash type

* remove convertToNil

* Sync coreth v0.12.4 rc0 (ava-labs#694)

* apply diff to rc0

* replace coreth with subnet-evm

* go mod tidy

* remove must commit

* remove apricots

* replace coreth with subnet-evm

* rename banff and cortina

* test memory db

* add dUpgrade

* fix errors

* sync with v0.12.4-rc0

* more diffs

* change templates

* readd preparePredicateSlots

* run goimports

* readd tx allow list check to txpool

* Fix tests

* readd subnet evm check for tests

* fix tests

* add gas limit & coinbase fakers

* Fix timestamp types

* check error from newblockchain

* fix gas limit in simulated genesis

* downgrade ci to go 1.19

* gofmt files

* rebump go to 1.20

* bump anr to latest

* bump anr to latest

* prepare predicate storage slots in Subnet-EVM

* uncomment tests

* change order of airdrop memory cleanup

* add utils import

* Coreth 0.12.4 x apply (ava-labs#720)

Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>

* move instruction sets

* revert unpack changes

* reduce diffs

* move genesis verify to vm (ava-labs#753)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

---------

Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>

* avoid adding/removing GasLimits in tests (ava-labs#755)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

* avoid adding/removing GasLimits in tests

* nit

---------

Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org>

---------

Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>

* Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release (ava-labs#757)

* Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release

* bump anr version to v1.7.1

* Migrate ABI unpack fix (ava-labs#750)

* change sprintf verb and use values (ava-labs#760)

* Generalize precompile test suite (ava-labs#759)

* restore old functions, generalize paths in sync subnet creation

* add subnet suit struct and methods

* move constants

* fix reviews

* add comment

* Update subnet.go

Signed-off-by: Ceyhun Onur <ceyhun.onur@avalabs.org>

---------

Signed-off-by: Ceyhun Onur <ceyhun.onur@avalabs.org>

* Add warp contract implementation (ava-labs#718)

* Add warp contract implementation

* Cleanup predicate test

* Fix new function signature

* Replace invalid fuzz test with unit test

* Add chain config to enable warp API for warp e2e test

* remove unused var

* Add experimental warning and move warp precompile to x/ package

* fix warning label

* Fix warning

* vm test nits

* Improve sendWarpMessenger sol comment

* more vm warp test nits

* Move warp params into params package

* More vm warp test nits

* Address more PR comments

* Remove triggerTx2

* Add check for expected topics from sendWarpMessage log

* Fix config test

* Fix incorrect replace

* remove unnecessary echo

* Address comments

* Address comments

* Address PR comments

* Improve comments

* Convert [32]byte type to common.Hash

* Add base cost for getVerifiedWarpMessage

* fix require equal type check

* Fix updated awm message format

* Update warp message format

* Move IWarpMessenger.sol to interfaces/

* Add newline to warp genesis

* uncomment assertion

* Fix broken links in README

* Add metrics to simulator (ava-labs#706)

* add tps

* get block build metrics

* Add issuance time, confirmed time, issued-> acceptance time, verify time

* Log times at end of batch

* cleaner

* address comments

* remove unused code block

* avoids taking len of channel

* nits

* pass in stringID

* move to loader

* remove unused field

* revert file back

* cleaner

* lint

* make it work for ws or for rpc

* protect

* endpoint

* no return on defer

* sep to a funciton

* have blockchainidstr passed in

* typo

* pass in metrics through config

* address comments

* address more comments and edit err policy of metrics functions

* add more logging to load_test

* typo

* better check

* fix endpoints

* typo:

* individual

* histogram

* address feedback:

* remove metrics from default

* address comments

* simplify time metrics

* better explanation

* address comments

* address comments

* cleanup

* more cleanup

* rename vars for clarity

* ws

* cleanup

* address comments

* ws

* expose metrics add flag

* fix blocking issue of http server and gracefully stop it

* cleanup

* use constant

* add issuance to confirmation metrics

* ws

* simplify metrics server

* Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release (ava-labs#757)

* Bump avalanchego to v1.10.5 and bump Subnet-EVM for v0.5.3 release

* bump anr version to v1.7.1

* handle control c

* print out output

* clean up

* clean up

* remove go routines to close client

* address comments

* memory leak

* fix

* print

* e2e test: connect to appropriate chain (ava-labs#771)

* Bump avalanchego dep and update version for next release (ava-labs#770)

* Bump avalanchego dep and update version for next release

* Update cache sizes

* Update flag in run script to replace staking-enabled=false

* Update block builder to enforce predicate one tx at a time (ava-labs#773)

* Update block builder to enforce predicate one tx at a time

* remove dead code

* Update miner/worker.go

Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Signed-off-by: aaronbuchwald <aaron.buchwald56@gmail.com>

---------

Signed-off-by: aaronbuchwald <aaron.buchwald56@gmail.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>

* update iocorders address

* remove state-sync-enabled from chain config

* 1s block ticker

* flush hubbleFeed when len > 512

* fix compilation err

---------

Signed-off-by: Gyuho Lee <gyuho.lee@avalabs.org>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ceyhun Onur <ceyhun.onur@avalabs.org>
Signed-off-by: aaronbuchwald <aaron.buchwald56@gmail.com>
Co-authored-by: Richard Pringle <rpring9@gmail.com>
Co-authored-by: Darioush Jalali <darioush.jalali@avalabs.org>
Co-authored-by: Ceyhun Onur <ceyhun.onur@avalabs.org>
Co-authored-by: Gyuho Lee <gyuho.lee@avalabs.org>
Co-authored-by: İzzet Emre Demir <izzetemredemir@gmail.com>
Co-authored-by: aaronbuchwald <aaron.buchwald56@gmail.com>
Co-authored-by: Gabriel Cardona <gabriel@avalabs.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anusha <anushachillara@gmail.com>
Co-authored-by: Cesar <137245636+nytzuga@users.noreply.github.com>
Co-authored-by: morrisettjohn <60852062+morrisettjohn@users.noreply.github.com>
Co-authored-by: nathan haim <nathan.haim@free.fr>
Co-authored-by: Martin Eckardt <m.eckardt@outlook.com>
Co-authored-by: rodrigo <77309055+RodrigoVillar@users.noreply.github.com>
Co-authored-by: Anusha <63559942+anusha-ctrl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Switch from using HardHat to Foundry
5 participants