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

Topology: missing hop to relay on for par #427

Closed
folex opened this issue Feb 8, 2022 · 0 comments · Fixed by #433
Closed

Topology: missing hop to relay on for par #427

folex opened this issue Feb 8, 2022 · 0 comments · Fixed by #433
Assignees
Labels
bug Something isn't working

Comments

@folex
Copy link
Member

folex commented Feb 8, 2022

Aqua version: 0.6.0-272

The following code hangs on join

import "@fluencelabs/aqua-lib/builtin.aqua"

func exec(peers: []string) -> []string:
    results: *string
    for peer <- peers par:
        on peer:
            results <- Op.string_to_b58("hahahahah")

    join results[2]
    <- results

Client output is quite useful here:

Your peerId: 12D3KooWRWiAKy3V5RCbHHBxyLxaZcqmCERAa6Nki8bp73EN4sd5
  waiting for an argument with idx '2' on stream with size '0'
  waiting for an argument with idx '2' on stream with size '0'

The reason can be seen in AIR. It's missing hop to -relay- before hopping to %init_peer_id%

(fold peers peer
 (par
  (seq
   (seq
    (call -relay- ("op" "noop") [])
    (xor
     (call peer ("op" "string_to_b58") ["hahahahah"] $results)
     (seq
      (call -relay- ("op" "noop") [])
      (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
     )
    )
   )
   (call %init_peer_id% ("op" "noop") [])
  )
  (next peer)
 )
)

Proof from one of the node's logs:

[2022-02-08T14:54:32.772654Z WARN  particle_node::connectivity] 12D3KooWKnEqMfYo9zvfHmqTLpLdiHXPe4SVqUWcWHDJdFGrSmcA Failed to discover 12D3KooWJ3zEN6xiaf2DYuHd9SGD6XBmxqDjpAJXotP25b1JVc8U for particle 575a16ea-fef7-443c-bc99-e4e4bf0742db: KademliaError::Timeout

Here's the command to run the code:

aqua run -i /tmp/join.aqua -f 'exec(peers)' --addr /dns4/kras-03.fluence.dev/tcp/19001/wss/p2p/12D3KooWJd3HaMJ1rpLY1kQvcjRPEvnDwcXrH8mJvk7ypcZXqXGE --data '{"peers": ["12D3KooWSD5PToNiLQwKDXsu8JSysCwUt8BVUJEqCHcDe7P5h45e", "12D3KooWR4cv1a8tv7pps4HH6wePNaK6gf1Hww5wcCMzeWxyNw51", "12D3KooWKnEqMfYo9zvfHmqTLpLdiHXPe4SVqUWcWHDJdFGrSmcA"]}'
@folex folex added the bug Something isn't working label Feb 8, 2022
@alari alari mentioned this issue Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants