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

Worker always fails to recognize itself as primary validateer #2168

Closed
kziemianek opened this issue Sep 27, 2023 · 0 comments · Fixed by #2287
Closed

Worker always fails to recognize itself as primary validateer #2168

kziemianek opened this issue Sep 27, 2023 · 0 comments · Fixed by #2287
Labels
D2-bug Something isn't working I2-medium should be completed within 10 working days

Comments

@kziemianek
Copy link
Member

kziemianek commented Sep 27, 2023

After a startup the worker registers itself in teerex's enclave registry and tries to determine whether he's a primary validateer (the first to be registered) or not but from my experience it looks like it always says it's not.

I've checked the campaign instances logs and it seems the problem existed there too.

[2023-09-27T21:26:23Z ERROR litentry_worker] ExtrinsicFailed ExtrinsicNotFound
[<] Extrinsic got finalized. Hash: None

In short, the implementation could not determine the block at which extrinsic was finalized so it fallbacks to current block. Then based on current block it check if any registered enclave existed before. The answer is yes, thus it pretends as it's not the primary while in fact it is.

if we_are_primary_validateer {
	println!("[+] We are the primary validateer");
} else {
	println!("[+] We are NOT the primary validateer");
}

Upstream ticket: scs/substrate-api-client#624

@kziemianek kziemianek added D2-bug Something isn't working I2-medium should be completed within 10 working days labels Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D2-bug Something isn't working I2-medium should be completed within 10 working days
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant