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

Error running event replay #1909

Open
radicleart opened this issue Mar 25, 2024 · 2 comments
Open

Error running event replay #1909

radicleart opened this issue Mar 25, 2024 · 2 comments
Assignees

Comments

@radicleart
Copy link

radicleart commented Mar 25, 2024

Describe the bug
UNDEFINED_VALUE: Undefined values are not allowed is returned from running the event replay version 2 process.

To Reproduce
Steps to reproduce the behavior:

Note: I performed steps 1-3 on my macbook pro (32G) and then rsynced to target ubuntu server.

  1. Downloaded archive
  2. Ran: python3 -m event_replay --tsv-file ../testnet-stacks-blockchain-api-7.8.2-20240322.gz
  3. In postgres:
  • drop database stacks_blockchain_api;
  • CREATE DATABASE stacks_blockchain_api WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8' OWNER = 'postgres';
  1. rsync -aP events $USER@$SERVER/.../events
  2. cd stacks-blockchain-api-7.8.2
  3. Ran: STACKS_EVENTS_DIR="/mnt/bitcoin-testnet/stacks-testnet/events-9.8.2/events" NODE_OPTIONS="--max-old-space-size=4096" STACKS_CHAIN_ID=2147483648 node ./lib/index.js from-parquet-events --workers=2

Expected behavior
Postgres database to be populated.

Console log

stacks-blockchain-api$ STACKS_EVENTS_DIR="/mnt/bitcoin-testnet/stacks-testnet/events-9.8.2/events" NODE_OPTIONS="--max-old-space-size=4096" STACKS_CHAIN_ID=2147483648 node ./lib/index.js from-parquet-events --workers=2
(node:155347) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
{"level":"info","time":"2024-03-25T12:31:31.451Z","pid":155347,"hostname":"leibniz.brightblock.org","name":"stacks-blockchain-api","component":"event-replay","msg":"Cleaning up the Database"}
Error: UNDEFINED_VALUE: Undefined values are not allowed
    at handleValue (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/types.js:83:20)
    at stringifyValue (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/types.js:113:5)
    at stringify (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/types.js:100:16)
    at build (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/connection.js:223:20)
    at Object.execute (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/connection.js:167:7)
    at Query.handler (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/index.js:294:15)
    at Query.handle (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/query.js:140:65)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachedError (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/query.js:170:23)
    at new Query (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/query.js:36:24)
    at sql (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/node_modules/postgres/cjs/src/index.js:112:11)
    at relNamesQuery (/mnt/bitcoin-testnet/stacks-testnet/stacks-blockchain-api-7.8.2/node_modules/@hirosystems/api-toolkit/src/postgres/migrations.ts:146:79) {
  code: 'UNDEFINED_VALUE'
}
from-parquet-events process failed

Environment (please complete the following information):

OS: Ubuntu 23.10 mantic
Stacks-blockchain-api: 7.8.2 (testnet)
Postgres: 15 (7.8.2)
psql (PostgreSQL) 15.6 (Ubuntu 15.6-1.pgdg23.10+1)
pg_restore (PostgreSQL) 15.6 (Ubuntu 15.6-1.pgdg23.10+1)

** Additional information**

Same error received trying to load the raw TSV file using version 1 of event replay.

@csgui csgui self-assigned this Mar 25, 2024
@zone117x
Copy link
Member

@csgui do we know what caused this bug? Will it be fixed by #1925 ?

@csgui
Copy link
Collaborator

csgui commented Apr 22, 2024

@zone117x No, this seems an issue with the local environment. Note that the same issue appears when trying to run even the first version of the event-replay.

@radicleart can you please clean-up the node_modules under your API folder stacks-blockchain-api-7.8.2 and try to run the event-replay again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants