indexer and vpn #1269
-
Hi, as it turns out, my indexer reacts to vpn in a very unambiguous way. It only works with vpn enabled. I recorded an interesting video |
Beta Was this translation helpful? Give feedback.
Replies: 18 comments
-
@PaulZhemanov This might be outside of the scope of the indexer, but let's make sure. Can you run |
Beta Was this translation helpful? Give feedback.
-
VPN disconnected:
VPN connected:
|
Beta Was this translation helpful? Give feedback.
-
now I have this error when running the indexer
|
Beta Was this translation helpful? Give feedback.
-
@PaulZhemanov What happened right before this? Also, do you know what block this was on? |
Beta Was this translation helpful? Give feedback.
-
updated the contract and abi in indexer accordingly.
|
Beta Was this translation helpful? Give feedback.
-
@PaulZhemanov That's definitely odd! Do you have a link to the source for your indexer? That way we can try to replicate it on our side and see what the issue may be. |
Beta Was this translation helpful? Give feedback.
-
of course, this is my project |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
yes, indexer doesn't work with start when vpn is off.. |
Beta Was this translation helpful? Give feedback.
-
Start service > cargo run --bin fuel-indexer -- run --run-migrations --accept-sql-queries --fuel-node-host beta-3.fuel.network --fuel-node-port 80 --replace-indexer --block-page-size 25 Deploy the indexer > forc index deploy
▹▹▸▹▹ ⏰ Building... Finished release [optimized] target(s) in 0.09s
▪▪▪▪▪ ✅ Build succeeded. Deploying indexer...
▪▪▪▪▪ ✅ Successfully deployed indexer. Output 2023-08-14T14:46:51.140518Z INFO fuel_indexer::commands::run: 109: Configuration: IndexerConfig { metering_points: Some(30000000000), log_level: "info", verbose: false, local_fuel_node: false, indexer_net_config: false, fuel_node: FuelClientConfig { host: "beta-3.fuel.network", port: "80" }, web_api: WebApiConfig { host: "localhost", port: "29987", max_body_size: 5242880 }, database: PostgresConfig { user: "postgres", password: "XXXX", host: "localhost", port: "5432", database: "postgres", verbose: "false" }, metrics: false, stop_idle_indexers: false, run_migrations: true, authentication: AuthenticationConfig { enabled: false, strategy: None, jwt_secret: "XXXX", jwt_issuer: None, jwt_expiry: None }, rate_limit: RateLimitConfig { enabled: false, request_count: None, window_size: None }, replace_indexer: true, accept_sql_queries: true, node_block_page_size: 25 }
2023-08-14T14:46:51.144074Z WARN sqlx_core::postgres::options::parse: 103: ignoring unrecognized connect parameter: verbose=false
2023-08-14T14:46:51.154624Z INFO sqlx::postgres::notice: 157: relation "_sqlx_migrations" already exists, skipping
2023-08-14T14:46:51.166019Z INFO fuel_indexer_lib::utils: 138: Parsed SocketAddr '127.0.0.1:29987' from 'localhost:29987'
2023-08-14T14:48:25.075822Z INFO tower_http::trace::on_request: 88: started processing request
2023-08-14T14:48:25.088176Z INFO fuel_indexer_postgres: 602: Registered Asset(Manifest) with Version(99cce46b9ca60e55d5a4f197391a87a36bef96cf7bbe8c3ee46f88998ad16969) to Indexer(paulzhemanov.indexer).
2023-08-14T14:48:25.090766Z INFO fuel_indexer_postgres: 602: Registered Asset(Schema) with Version(9e8da2731204e3cdb1c3ea955a13168c0a4142b836bd5faaf1215d06004bc871) to Indexer(paulzhemanov.indexer).
2023-08-14T14:48:25.091912Z INFO fuel_indexer_schema::db::manager: 35: SchemaManager creating schema for Indexer(paulzhemanov.indexer) with Version(9e8da2731204e3cdb1c3ea955a13168c0a4142b836bd5faaf1215d06004bc871).
2023-08-14T14:48:25.194099Z INFO fuel_indexer_postgres: 602: Registered Asset(Wasm) with Version(c52c53064b487dcad2fe295d1550cd9d44de075bfa009b1925ca800c8e4e8182) to Indexer(paulzhemanov.indexer).
2023-08-14T14:48:25.195700Z INFO tower_http::trace::on_response: 254: finished processing request latency=119891 μs status=200
2023-08-14T14:48:25.382708Z INFO fuel_indexer::service: 381: Resuming Indexer(paulzhemanov.indexer) from block 1839870
2023-08-14T14:48:28.917036Z INFO fuel_indexer::database: 209: Database loading schema for Indexer(paulzhemanov.indexer) with Version(9e8da2731204e3cdb1c3ea955a13168c0a4142b836bd5faaf1215d06004bc871).
2023-08-14T14:48:28.918725Z INFO fuel_indexer::executor: 106: Indexer(paulzhemanov.indexer) subscribing to Fuel node at beta-3.fuel.network:80
2023-08-14T14:48:28.919222Z WARN fuel_indexer::executor: 113: No end_block specified in manifest. Indexer will run forever.
thread 'tokio-runtime-worker' panicked at 'misaligned pointer dereference: address must be a multiple of 0x10 but is 0x1089c3c18', /Users/rashad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmer-vm-4.0.0/src/trap/traphandlers.rs:219:28
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'tokio-runtime-worker' panicked at 'panic in a function that cannot unwind', library/core/src/panicking.rs:126:5
stack backtrace:
0: 0x102a276f4 - std::backtrace_rs::backtrace::libunwind::trace::h35c35bd6a1eea1a3
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x102a276f4 - std::backtrace_rs::backtrace::trace_unsynchronized::h6e6a37fdc09ec2da
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x102a276f4 - std::sys_common::backtrace::_print_fmt::h6ae2889d87a644d1
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:65:5
3: 0x102a276f4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb75be2413dd8ceb3
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:44:22
4: 0x102a49234 - core::fmt::rt::Argument::fmt::hfc9103857ff63de2
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/rt.rs:138:9
5: 0x102a49234 - core::fmt::write::h95d50546e769656f
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/fmt/mod.rs:1094:21
6: 0x102a23bc4 - std::io::Write::write_fmt::hce019ca594763835
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/io/mod.rs:1713:15
7: 0x102a27548 - std::sys_common::backtrace::_print::h15dce0f07dfee3db
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:47:5
8: 0x102a27548 - std::sys_common::backtrace::print::hae7307dcada41b2a
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:34:9
9: 0x102a289c8 - std::panicking::default_hook::{{closure}}::h30c41986d637ef23
10: 0x102a287d0 - std::panicking::default_hook::h81d03189ef2e7e78
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:288:9
11: 0x102a28e38 - std::panicking::rust_panic_with_hook::he8360f4d28da55fc
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:705:13
12: 0x102a28d08 - std::panicking::begin_panic_handler::{{closure}}::he9e07d605072520f
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:595:13
13: 0x102a27ad4 - std::sys_common::backtrace::__rust_end_short_backtrace::he03bf52f9c1eb73a
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/sys_common/backtrace.rs:151:18
14: 0x102a28ab8 - rust_begin_unwind
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
15: 0x102ad7ab4 - core::panicking::panic_nounwind_fmt::h6a635b966d82551e
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:96:14
16: 0x102ad7b30 - core::panicking::panic_nounwind::h241eff56ec55ba7a
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:126:5
17: 0x102ad7c24 - core::panicking::panic_cannot_unwind::h911ff5cd61f62d63
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:188:5
18: 0x10133d780 - wasmer_vm::trap::traphandlers::trap_handler::h6ea23e7b5f298104
at /Users/rashad/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmer-vm-4.0.0/src/trap/traphandlers.rs:192:9
19: 0x18b7702a4 - _OSAtomicTestAndClearBarrier
thread caused non-unwinding panic. aborting.
[1] 28933 abort cargo run --bin fuel-indexer -- run --run-migrations --accept-sql-queries |
Beta Was this translation helpful? Give feedback.
-
on master branch is my current work project, contract was wrote on beta-3, but i start indexer on latest toolchain version(0.19.4 indexer) |
Beta Was this translation helpful? Give feedback.
-
@PaulZhemanov Ok sweet, I'll report back in a bit. Last question, what version of |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@PaulZhemanov Got it. Just an FYI you should be using |
Beta Was this translation helpful? Give feedback.
-
with 1.69.0 result is same... |
Beta Was this translation helpful? Give feedback.
-
@PaulZhemanov Yep, I get the same result as well, just an FYI. |
Beta Was this translation helpful? Give feedback.
-
Here's the fake example I used to prove Issue 2 extern crate alloc;
use fuel_indexer_utils::prelude::*;
#[indexer(manifest = "indexer.manifest.yaml")]
pub mod indexer_index_mod {
fn saprana_indexer_handler(block: BlockData) {
let height = block.height;
info!("Height: {height}");
}
fn handle_event_creation(data: CreateEventLog) {
let entry = EventEntry {
id: 1,
owner: Address::default(),
name: "name".to_string(),
description: "description".to_string(),
// image: data.event.image,
max_participantes: 1,
deadline: 1,
ticket_price: 1,
tickets_sold: 1,
balance: 1,
};
info!("CreateEventLog {:#?}", entry);
entry.save();
}
fn handle_buy_ticket(data: BuyTicketLog) {
let entry = BuyTicketEntry {
id: 2,
event_id: 1,
timestamp: 1,
buyer: Identity::Address(Address::default()),
ticket_id: 1,
ticket_number: 1,
};
info!("BuyTicketLog {:#?}", entry);
entry.save();
}
fn handle_claim(data: ClaimLog) {
let entry = ClaimEntry {
id: 3,
event_id: 1,
timestamp: 1,
amount: 1,
};
info!("ClaimLog {:#?}", entry);
entry.save();
}
} |
Beta Was this translation helpful? Give feedback.
-
@PaulZhemanov Just FYI I've converted this to a discussion |
Beta Was this translation helpful? Give feedback.
@PaulZhemanov
fuels
namespaced (e.g.,fuels0x039393...
) or set yourcontract_id
to null (e.g.,contract_id: ~
)Here's the fake example I used to prove Issue 2