The libp2p_node
is an integral part of the ACN.
ACN - Agent Communication Network
The agent communication network (ACN) provides a system for agents to find each other and communicate, solely based on their wallet addresses. It addresses the message delivery problem.
For more details check out the docs.
Development
To run all tests run:
go test -p 1 -timeout 0 -count 1 -v ./...
To lint:
golines . -w
golangci-lint run
staticcheck ./...
For mocks generation: check https://github.com/golang/mock
Messaging patterns
Interaction protocol
ACN
TCP/UDP/...
Messaging patterns inwards ACN:
Connection (p2p_libp2p_client
) > Delegate Client > Relay Peer > Peer (Discouraged!)
Connection (p2p_libp2p_client
) > Delegate Client > Peer
Connection (p2p_libp2p
) > Relay Peer > Peer
Connection (p2p_libp2p
) > Peer
Messaging patterns outwards ACN
Peer > Relay Peer > Delegate Client > Connection (p2p_libp2p_client
) (Discouraged!)
Peer > Relay Peer > Connection (p2p_libp2p
)
Peer > Delegate Client > Connection (p2p_libp2p_client
)
Peer > Connection (p2p_libp2p
)
In total 44 = 16 patterns (practically: 33 = 9 patterns)
Guarantees
ACN should guarantee total ordering of messages for all agent pairs, independent of the type of connection and ACN messaging pattern used.
v1
):
Advanced feature (post Furthermore, there is the agent mobility. An agent can move between entry-points (Relay Peer/Peer/Delegate Client). The ACN must ensure that all messaging patterns maintain total ordering of messages for agent pairs during the move.
ACN protocols
The ACN has the following protocols:
- register
- lookup
- unregister (dealt with by DHT defaults)
- DHT default protocols in libp2p
- message delivery protocol