Elle Mouton
f6c41565d1
accessman: fix structured logging formatting
2025-07-01 20:09:07 +02:00
yyforyongyu
da13c7ab66
lnd: remove peer from peerChanInfo
when necessary
...
We now remove the peer from `peerChanInfo` if this peer doesn't have
channels with us. Also patched a unit test for `removePeerAccess`.
2025-06-20 15:50:45 -07:00
yyforyongyu
ceeb123925
channeldb+lnd: rename peerCounts
to peerChanInfo
for clarity
2025-06-20 15:50:45 -07:00
yyforyongyu
107b74d81d
accessman+lnd: rename checkIncomingConnBanScore
for clarity
2025-06-20 15:50:45 -07:00
yyforyongyu
0b0513d88c
accessman: make sure to decrement PendingOpenCount
2025-06-20 15:50:25 -07:00
yyforyongyu
d9e3412ed5
accessman: skip incrementing num of slots for existing peer
...
When a peer is already existing, we should skip incrementing the
`numRestricted` count.
Also patched unit test for method `addPeerAccess`.
2025-06-20 15:50:25 -07:00
yyforyongyu
bd99924383
lnd: only restrict slots for inbound connections
...
For outbound connections, since they are initialized by the users, we
can relax on the restriction. A future global limit may be added - as
for now, we will let them to be managed by the users.
2025-06-20 15:50:25 -07:00
yyforyongyu
89a819db46
accessman: reduce lock span by excluding ctx
2025-06-20 15:50:25 -07:00
yyforyongyu
a0439155d4
accessman+lnd: check if a peer is found in peerScores
...
We need to also check this map to make sure the peer exists or not.
2025-06-20 15:50:25 -07:00
yyforyongyu
b527f19de7
accessman: skip restriction for existing peers
...
When a peer already has a connection with us, there's no need to check
for available slots as we will either close the old conn or refuse the
new conn.
2025-06-20 15:50:25 -07:00
yyforyongyu
6d70e3607b
accessman: only check ban score for restricted peers
...
If a peer has, or used to have a channel with us there's no need to
check for the ban score.
2025-06-04 12:22:11 +02:00
Olaoluwa Osuntokun
21ca1e650b
acessman: improve access manager logging and error handling
...
This commit adds logs to the new access manager. This'll help us monitor
the new system behavior, and may make debugging easier in the future.
2025-04-17 17:20:11 -07:00
xinhangzhou
b7e3c20383
refactor: use maps.Copy for cleaner map handling
...
Signed-off-by: xinhangzhou <shuangcui@aliyun.com >
2025-03-25 01:19:55 +08:00
Eugene Siegel
6eb746fbba
server.go+accessman.go: introduce caches for access permissions
...
Here we introduce the access manager which has caches that will
determine the access control status of our peers. Peers that have
had their funding transaction confirm with us are protected. Peers
that only have pending-open channels with us are temporary access
and can have their access revoked. The rest of the peers are granted
restricted access.
2025-03-11 20:42:34 -04:00