near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.31k stars 618 forks source link

Dependency error when trying to download genesis file for indexer #8479

Open gamenautdips opened 1 year ago

gamenautdips commented 1 year ago

While executing cargo run --release -- --home-dir ~/.near/testnet init --chain-id testnet --download-config --download-genesis

Getting the following error

Compiling near-rosetta-rpc v0.0.0 (https://github.com/near/nearcore?rev=9a3edd1fd2b8ee6968be69b30593dd134c2da7fa#9a3edd1f) error[E0560]: struct ResponseWrapper<_, _> has no field named responder --> /home/dips/.cargo/git/checkouts/nearcore-5bf7818cf2261fd0/9a3edd1/chain/rosetta-rpc/src/lib.rs:76:1 76 #[api_v2_operation] ^^^^^^^^^^^^^^^^^^^ field does not exist
::: /home/dips/.cargo/registry/src/github.com-1ecc6299db9ec823/paperclip-core-0.5.2/src/v2/actix.rs:638:12 638 pub struct ResponseWrapper<T, H>(#[pin] pub T, pub H); --------------- ResponseWrapper<_, _> defined here
= note: this error originates in the attribute macro `api_v2_operation` (in Nightly builds, run with -Z macro-backtrace for more info)

help: ResponseWrapper<_, _> is a tuple struct, use the appropriate syntax | 76 | ResponseWrapper<, >(/ fields /)

akhi3030 commented 1 year ago

Thanks for raising the issue @gamenautdips!

@pompon0: you seem to have touched this file most recently. Could you take a look please?

evgenykuzyakov commented 1 year ago

Have the same issue with the indexer for 1.31.0 dependency.

evgenykuzyakov commented 1 year ago

Looks like I'm able to solve the issue for my indexer by locking versions for some nearcore dependencies:

paperclip = { version = "=0.7.0", features = ["actix4"] }
paperclip-actix = "=0.5.0"
paperclip-macros = "=0.6.0"

Here is the commit: https://github.com/evgenykuzyakov/indexer-tutorials/commit/1656ac86a029456d409d6ced6f03286e15a760d0

akhi3030 commented 1 year ago

@pompon0: is there any update on this issue please? Do you have time investigate this or should someone else take a look?

CC: @walnut-the-cat. Maybe you can also help drive this.

pompon0 commented 1 year ago

Hi @gamenautdips , at 9a3edd1fd2b8ee6968be69b30593dd134c2da7fa paperclip-core is locked to 0.5.1 (see Cargo.lock), while your error message indicates that paperclip-core 0.5.2 is compiled. Can you retry compiling with a fresh clone of the nearcore repository?

pompon0 commented 1 year ago

Hi @evgenykuzyakov please provide