Code Monkey home page Code Monkey logo

tellor-parachain-integration-tests's People

Watchers

 avatar

tellor-parachain-integration-tests's Issues

docker build fail

I'm trying to run the build command in the README and getting this error:

#12 1128.7    Compiling polkadot-parachain v0.9.40 (https://github.com/purestake/polkadot?branch=moonbeam-polkadot-v0.9.40#051c0201)
#12 1129.9    Compiling precompile-utils v0.1.0 (https://github.com/purestake/moonbeam?rev=62ddcf21694c5c6875788acfc309cccf0cc857bd#62ddcf21)
#12 1131.6    Compiling pallet-transaction-payment v4.0.0-dev (https://github.com/purestake/substrate?branch=moonbeam-polkadot-v0.9.40#fadc3ac7)
#12 1134.4    Compiling pallet-session v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e345)
#12 1136.6 error[E0053]: method `call` has an incompatible type for trait
#12 1136.6    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:378:13
#12 1136.6     |
#12 1136.6 378 |         transfer: Option<evm::Transfer>,
#12 1136.6     |                   ^^^^^^^^^^^^^^^^^^^^^
#12 1136.6     |                   |
#12 1136.6     |                   expected struct `fp_evm::Transfer`, found struct `evm::Transfer`
#12 1136.6     |                   help: change the parameter type to match the trait: `std::option::Option<fp_evm::Transfer>`
#12 1136.6     |
#12 1136.6     = note: expected signature `fn(&mut RestrictiveHandle<'a, H>, H160, std::option::Option<fp_evm::Transfer>, environmental::Vec<_>, std::option::Option<_>, _, &fp_evm::Context) -> (fp_evm::ExitReason, environmental::Vec<_>)`
#12 1136.6                found signature `fn(&mut RestrictiveHandle<'a, H>, H160, std::option::Option<evm::Transfer>, environmental::Vec<_>, std::option::Option<_>, _, &evm::Context) -> (evm::ExitReason, environmental::Vec<_>)`
#12 1136.6 
#12 1136.6 error[E0053]: method `record_cost` has an incompatible type for trait
#12 1136.6    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:395:42
#12 1136.6     |
#12 1136.6 395 |     fn record_cost(&mut self, cost: u64) -> Result<(), evm::ExitError> {
#12 1136.6     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
#12 1136.6     |                                             |
#12 1136.6     |                                             expected enum `fp_evm::ExitError`, found enum `evm::ExitError`
#12 1136.6     |                                             help: change the output type to match the trait: `Result<(), fp_evm::ExitError>`
#12 1136.6     |
#12 1136.6     = note: expected signature `fn(&mut RestrictiveHandle<'a, H>, _) -> Result<_, fp_evm::ExitError>`
#12 1136.6                found signature `fn(&mut RestrictiveHandle<'a, H>, _) -> Result<_, evm::ExitError>`
#12 1136.6 
#12 1136.6 error[E0053]: method `log` has an incompatible type for trait
#12 1136.6    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:408:7
#12 1136.6     |
#12 1136.6 408 |     ) -> Result<(), evm::ExitError> {
#12 1136.6     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^
#12 1136.6     |          |
#12 1136.6     |          expected enum `fp_evm::ExitError`, found enum `evm::ExitError`
#12 1136.6     |          help: change the output type to match the trait: `Result<(), fp_evm::ExitError>`
#12 1136.6     |
#12 1136.6     = note: expected signature `fn(&mut RestrictiveHandle<'a, H>, H160, environmental::Vec<_>, environmental::Vec<_>) -> Result<_, fp_evm::ExitError>`
#12 1136.6                found signature `fn(&mut RestrictiveHandle<'a, H>, H160, environmental::Vec<_>, environmental::Vec<_>) -> Result<_, evm::ExitError>`
#12 1136.6 
#12 1136.6 error[E0053]: method `context` has an incompatible type for trait
#12 1136.6    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:420:23
#12 1136.6     |
#12 1136.6 420 |     fn context(&self) -> &evm::Context {
#12 1136.6     |                          ^^^^^^^^^^^^^
#12 1136.6     |                          |
#12 1136.6     |                          expected struct `fp_evm::Context`, found struct `evm::Context`
#12 1136.6     |                          help: change the output type to match the trait: `&fp_evm::Context`
#12 1136.6     |
#12 1136.6     = note: expected signature `fn(&RestrictiveHandle<'a, H>) -> &fp_evm::Context`
#12 1136.6                found signature `fn(&RestrictiveHandle<'a, H>) -> &evm::Context`
#12 1136.6 
#12 1136.9 error[E0050]: method `is_precompile` has 2 parameters but the declaration in trait `fp_evm::PrecompileSet::is_precompile` has 3
#12 1136.9    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:967:19
#12 1136.9     |
#12 1136.9 967 |     fn is_precompile(&self, address: H160) -> bool {
#12 1136.9     |                      ^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 2
#12 1136.9     |
#12 1136.9     = note: `is_precompile` from trait: `fn(&Self, H160, u64) -> IsPrecompileResult`
#12 1136.9 
#12 1137.0 error[E0061]: this method takes 2 arguments but 1 argument was supplied
#12 1137.0    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:353:57
#12 1137.0     |
#12 1137.0 353 |         if <R as pallet_evm::Config>::PrecompilesValue::get().is_precompile(caller) {
#12 1137.0     |                                                               ^^^^^^^^^^^^^-------- an argument of type `u64` is missing
#12 1137.0     |
#12 1137.0 note: associated function defined here
#12 1137.0    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/src/executor/stack/precompile.rs:99:5
#12 1137.0     |
#12 1137.0 99  |     fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult;
#12 1137.0     |        ^^^^^^^^^^^^^
#12 1137.0 help: provide the argument
#12 1137.0     |
#12 1137.0 353 |         if <R as pallet_evm::Config>::PrecompilesValue::get().is_precompile(caller, /* u64 */) {
#12 1137.0     |                                                                            ~~~~~~~~~~~~~~~~~~~
#12 1137.0 
#12 1137.2 error[E0308]: mismatched types
#12 1137.2    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:353:6
#12 1137.2     |
#12 1137.2 353 |         if <R as pallet_evm::Config>::PrecompilesValue::get().is_precompile(caller) {
#12 1137.2     |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found enum `IsPrecompileResult`
#12 1137.2 
#12 1137.3 error[E0308]: arguments to this method are incorrect
#12 1137.3    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:392:5
#12 1137.3     |
#12 1137.3 392 |             .call(address, transfer, input, target_gas, is_static, context)
#12 1137.3     |              ^^^^                                                  ------- expected struct `fp_evm::Context`, found struct `evm::Context`
#12 1137.3     |
#12 1137.3 note: expected struct `fp_evm::Transfer`, found struct `evm::Transfer`
#12 1137.3    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:392:19
#12 1137.3     |
#12 1137.3 392 |             .call(address, transfer, input, target_gas, is_static, context)
#12 1137.3     |                            ^^^^^^^^
#12 1137.3     = note: struct `evm::Transfer` and struct `fp_evm::Transfer` have similar names, but are actually distinct types
#12 1137.3 note: struct `evm::Transfer` is defined in crate `evm_runtime`
#12 1137.3    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/evm-runtime-0.37.0/src/handler.rs:7:1
#12 1137.3     |
#12 1137.3 7   | pub struct Transfer {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^^
#12 1137.3 note: struct `fp_evm::Transfer` is defined in crate `evm_runtime`
#12 1137.3    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/runtime/src/handler.rs:7:1
#12 1137.3     |
#12 1137.3 7   | pub struct Transfer {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^^
#12 1137.3     = note: perhaps two different versions of crate `evm_runtime` are being used?
#12 1137.3     = note: struct `evm::Context` and struct `fp_evm::Context` have similar names, but are actually distinct types
#12 1137.3 note: struct `evm::Context` is defined in crate `evm_runtime`
#12 1137.3    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/evm-runtime-0.37.0/src/context.rs:39:1
#12 1137.3     |
#12 1137.3 39  | pub struct Context {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^
#12 1137.3 note: struct `fp_evm::Context` is defined in crate `evm_runtime`
#12 1137.3    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/runtime/src/context.rs:39:1
#12 1137.3     |
#12 1137.3 39  | pub struct Context {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^
#12 1137.3     = note: perhaps two different versions of crate `evm_runtime` are being used?
#12 1137.3 note: associated function defined here
#12 1137.3    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/src/executor/stack/precompile.rs:40:5
#12 1137.3     |
#12 1137.3 40  |     fn call(
#12 1137.3     |        ^^^^
#12 1137.3 
#12 1137.3 error[E0308]: mismatched types
#12 1137.3    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:391:3
#12 1137.3     |
#12 1137.3 383 |       ) -> (evm::ExitReason, Vec<u8>) {
#12 1137.3     |            -------------------------- expected `(evm::ExitReason, environmental::Vec<u8>)` because of return type
#12 1137.3 ...
#12 1137.3 391 | /         self.handle
#12 1137.3 392 | |             .call(address, transfer, input, target_gas, is_static, context)
#12 1137.3     | |___________________________________________________________________________^ expected enum `evm::ExitReason`, found enum `fp_evm::ExitReason`
#12 1137.3     |
#12 1137.3     = note: enum `fp_evm::ExitReason` and enum `evm::ExitReason` have similar names, but are actually distinct types
#12 1137.3 note: enum `fp_evm::ExitReason` is defined in crate `evm_core`
#12 1137.3    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/core/src/error.rs:24:1
#12 1137.3     |
#12 1137.3 24  | pub enum ExitReason {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^^
#12 1137.3 note: enum `evm::ExitReason` is defined in crate `evm_core`
#12 1137.3    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/evm-core-0.37.0/src/error.rs:24:1
#12 1137.3     |
#12 1137.3 24  | pub enum ExitReason {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^^
#12 1137.3     = note: perhaps two different versions of crate `evm_core` are being used?
#12 1137.3 
#12 1137.3 error[E0308]: mismatched types
#12 1137.3    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:396:3
#12 1137.3     |
#12 1137.3 395 |     fn record_cost(&mut self, cost: u64) -> Result<(), evm::ExitError> {
#12 1137.3     |                                             -------------------------- expected `Result<(), evm::ExitError>` because of return type
#12 1137.3 396 |         self.handle.record_cost(cost)
#12 1137.3     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `evm::ExitError`, found enum `fp_evm::ExitError`
#12 1137.3     |
#12 1137.3     = note: enum `fp_evm::ExitError` and enum `evm::ExitError` have similar names, but are actually distinct types
#12 1137.3 note: enum `fp_evm::ExitError` is defined in crate `evm_core`
#12 1137.3    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/core/src/error.rs:105:1
#12 1137.3     |
#12 1137.3 105 | pub enum ExitError {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^
#12 1137.3 note: enum `evm::ExitError` is defined in crate `evm_core`
#12 1137.3    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/evm-core-0.37.0/src/error.rs:105:1
#12 1137.3     |
#12 1137.3 105 | pub enum ExitError {
#12 1137.3     | ^^^^^^^^^^^^^^^^^^
#12 1137.3     = note: perhaps two different versions of crate `evm_core` are being used?
#12 1137.3 
#12 1137.4 error[E0308]: mismatched types
#12 1137.4    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:409:3
#12 1137.4     |
#12 1137.4 408 |     ) -> Result<(), evm::ExitError> {
#12 1137.4     |          -------------------------- expected `Result<(), evm::ExitError>` because of return type
#12 1137.4 409 |         self.handle.log(address, topics, data)
#12 1137.4     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `evm::ExitError`, found enum `fp_evm::ExitError`
#12 1137.4     |
#12 1137.4     = note: enum `fp_evm::ExitError` and enum `evm::ExitError` have similar names, but are actually distinct types
#12 1137.4 note: enum `fp_evm::ExitError` is defined in crate `evm_core`
#12 1137.4    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/core/src/error.rs:105:1
#12 1137.4     |
#12 1137.4 105 | pub enum ExitError {
#12 1137.4     | ^^^^^^^^^^^^^^^^^^
#12 1137.4 note: enum `evm::ExitError` is defined in crate `evm_core`
#12 1137.4    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/evm-core-0.37.0/src/error.rs:105:1
#12 1137.4     |
#12 1137.4 105 | pub enum ExitError {
#12 1137.4     | ^^^^^^^^^^^^^^^^^^
#12 1137.4     = note: perhaps two different versions of crate `evm_core` are being used?
#12 1137.4 
#12 1137.4 error[E0308]: mismatched types
#12 1137.4    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:421:3
#12 1137.4     |
#12 1137.4 420 |     fn context(&self) -> &evm::Context {
#12 1137.4     |                          ------------- expected `&evm::Context` because of return type
#12 1137.4 421 |         self.handle.context()
#12 1137.4     |         ^^^^^^^^^^^^^^^^^^^^^ expected struct `evm::Context`, found struct `fp_evm::Context`
#12 1137.4     |
#12 1137.4     = note: struct `fp_evm::Context` and struct `evm::Context` have similar names, but are actually distinct types
#12 1137.4 note: struct `fp_evm::Context` is defined in crate `evm_runtime`
#12 1137.4    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/runtime/src/context.rs:39:1
#12 1137.4     |
#12 1137.4 39  | pub struct Context {
#12 1137.4     | ^^^^^^^^^^^^^^^^^^
#12 1137.4 note: struct `evm::Context` is defined in crate `evm_runtime`
#12 1137.4    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/evm-runtime-0.37.0/src/context.rs:39:1
#12 1137.4     |
#12 1137.4 39  | pub struct Context {
#12 1137.4     | ^^^^^^^^^^^^^^^^^^
#12 1137.4     = note: perhaps two different versions of crate `evm_runtime` are being used?
#12 1137.4 
#12 1137.5 error[E0061]: this method takes 2 arguments but 1 argument was supplied
#12 1137.5    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:678:67
#12 1137.5     |
#12 1137.5 678 |         address.as_bytes().starts_with(A::get()) && self.precompile_set.is_precompile(address)
#12 1137.5     |                                                                         ^^^^^^^^^^^^^--------- an argument of type `u64` is missing
#12 1137.5     |
#12 1137.5 note: associated function defined here
#12 1137.5    --> /usr/local/cargo/git/checkouts/evm-eab4047f75f82c9d/f9b8dd9/src/executor/stack/precompile.rs:99:5
#12 1137.5     |
#12 1137.5 99  |     fn is_precompile(&self, address: H160, remaining_gas: u64) -> IsPrecompileResult;
#12 1137.5     |        ^^^^^^^^^^^^^
#12 1137.5 help: provide the argument
#12 1137.5     |
#12 1137.5 678 |         address.as_bytes().starts_with(A::get()) && self.precompile_set.is_precompile(address, /* u64 */)
#12 1137.5     |                                                                                      ~~~~~~~~~~~~~~~~~~~~
#12 1137.5 
#12 1137.5 error[E0308]: mismatched types
#12 1137.5    --> /usr/local/cargo/git/checkouts/moonbeam-8659e8ca27bfae52/62ddcf2/precompiles/utils/src/precompile_set.rs:678:47
#12 1137.5     |
#12 1137.5 678 |         address.as_bytes().starts_with(A::get()) && self.precompile_set.is_precompile(address)
#12 1137.5     |         ----------------------------------------    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found enum `IsPrecompileResult`
#12 1137.5     |         |
#12 1137.5     |         expected because this is `bool`
#12 1137.5 
#12 1143.2 Some errors have detailed explanations: E0050, E0053, E0061, E0308.
#12 1143.2 For more information about an error, try `rustc --explain E0050`.
#12 1143.3 error: could not compile `precompile-utils` due to 14 previous errors
#12 1143.3 warning: build failed, waiting for other jobs to finish...
#12 1571.8 find: './target/release/deps/tellor*': No such file or directory
------
executor failed running [/bin/sh -c SKIP_WASM_BUILD=1 cargo build --tests --release;      find ./target/release/deps/tellor* -maxdepth 1 -perm -111 -type f -exec mv {} tellor-parachain-integration-tests \;]: exit code: 1

Some notes / other test suggestions

  • Can reduce repeated setup steps like deploying and initializing contracts into one function call?
  • In the tests, calls to submit_value use query_data var, which is slightly confusing, as function expects the query id.
  • Only difference between on_initialize_hook_on_consumer_parachain_sends_votes_to_evm_parachain and send_votes_from_consumer_parachain_to_evm_parachain_works is that second test includes the assert for send_votes. Can be consolidated?
  • I suggest adding a test that includes multiple vote rounds for a dispute on a submitted staking token price and price of dot/usd, where the outcome of voting switches between tallies. Then checking that certain reporters can't report because of updated min staking amount.
  • A test that ensures/shows the difference in voting windows between the oracle consumer chain pallet and evm chain contracts would be nice.
  • A test that has multiple disputes opened, voted on, and executed for values submitted on different registered oracle consumer parachains.
  • A test ensuring contract calls that adding/updating stake for multiple different oracle consumer chain accounts (on different parachains), but using the same evm address updates reporting ability properly on those different parachains.

Source bytecode from contract.json

Contract bytecode is currently hardcoded into the code via byte array constants. Sourcing this data from the corresponding contract.json files (forge build output) at compile time would make updating the contracts much easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.