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

V4 indexer few issues #1038

Open
Karuzzzo opened this issue Feb 2, 2024 · 2 comments
Open

V4 indexer few issues #1038

Karuzzzo opened this issue Feb 2, 2024 · 2 comments
Labels

Comments

@Karuzzzo
Copy link

Karuzzzo commented Feb 2, 2024

Hello.
I'm currently trying to run indexer instance with synced V4 node. Ran into few issues.
First one - this docker image will not work on x86 architecture, and probably should be changed to default alpine.

Another issue or, rather, a question:

From this comment I see that if incomingBlock > currentBlock + 1 - it should be applied.

But according to this line - if incoming block > currentBlock + 1 - it will be ignored and skipped.

So how can Indexer work correctly?
Currently all blocks from my node are skipped due to currentBlock = 0 and incomingBlock > 7000000

Copy link

linear bot commented Feb 2, 2024

@Karuzzzo
Copy link
Author

Karuzzzo commented Feb 2, 2024

If I remove this constraint for newBlock == currentBlock + 1 - I get error on inserting perpetual position with size = 0 for each block.

ender-1             |   "error": {
ender-1             |     "message": "SELECT dydx_block_processor($1) AS result; - null value in column \"size\" violates not-null constraint",
ender-1             |     "length": 786,
ender-1             |     "name": "error",
ender-1             |     "severity": "ERROR",
ender-1             |     "code": "23502",
ender-1             |     "detail": "Failing row contains (06cd4e80-dab0-5061-813d-63acfedab298, 38dd9a57-eff4-587d-af98-a0b9605a8850, 1, SHORT, OPEN, null, null, 0, null, 0, 0, 2024-02-02 16:05:07.119+00, null, 7486411, null, \\x00723bcb0000000200000000, null, \\x00723bcb0000000200000000, 0).",
ender-1             |     "where": "SQL statement \"INSERT INTO perpetual_positions VALUES (perpetual_position_record.*)\"\nPL/pgSQL function dydx_subaccount_update_handler(integer,timestamp without time zone,jsonb,integer,integer) line 130 at SQL statement\nPL/pgSQL function dydx_block_processor_unordered_handlers(jsonb) line 54 at assignment\nPL/pgSQL function dydx_block_processor(jsonb) line 25 at assignment",
ender-1             |     "schema": "public",
ender-1             |     "table": "perpetual_positions",
ender-1             |     "column": "size",
ender-1             |     "file": "execMain.c",
ender-1             |     "line": "1948",
ender-1             |     "routine": "ExecConstraints"
ender-1             |   },

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

No branches or pull requests

2 participants
@Karuzzzo and others