Commit Graph

7928 Commits

Author SHA1 Message Date
skoupidi
3062597fca drk is back in the menu boys 2024-01-25 18:52:03 +02:00
skoupidi
2f6bb5748f drk2: Dao functionality added 2024-01-25 18:44:38 +02:00
skoupidi
c04667a845 net/session/outbound_session::fetch_address(): simplyfied returns 2024-01-25 14:51:13 +02:00
draoi
3447394eda net: make fetch address logic less nested + fix bug
Previously when we called whitelist_fetch_[...](), it would call
greylist_fetch_[...]() inside that method if insufficient whitelist
entries were found.

This was confusing and non-intuitive.

This commit removes this nesting. Now we call
whitelist_fetch_[...] followed by greylist_fetch_[...] in ProtocolAddr
and OutboundSession explicitly.

This commit also fixes a bug in the refinery.
2024-01-25 13:30:24 +01:00
draoi
74f91dd3bc dchat: fix mistakes on default config 2024-01-25 13:22:11 +01:00
aggstam
6e7dc81704 chore: clippy 2024-01-24 17:57:46 +02:00
parazyd
b498847676 contract/money: Add missing error to the error enum 2024-01-24 16:26:14 +01:00
zero
d06cffd0f1 spec: add description of the group hash algo 2024-01-24 14:13:58 +01:00
zero
98fd142aa4 spec: elgamal enc, cleanup use of subscripts 2024-01-24 13:51:50 +01:00
parazyd
228aea9926 contract/fee: Enforce that fee_paid > 0 2024-01-24 13:11:56 +01:00
lunar-mining
354ef3270e store: reverse the order of hostlists
entries with the most recently seen timestamps should be at the top of
the list.
2024-01-24 12:47:36 +01:00
parazyd
1daffcb911 ci: Remove codeberg mirror push 2024-01-24 12:22:34 +01:00
parazyd
5f73784731 README: Update MSRV 2024-01-24 12:18:30 +01:00
zero
b320fd881b spec: ElGamalEncryptedNote 2024-01-24 12:12:55 +01:00
zero
a00034146e spec: 𝔽ᵥ to 𝔽_q 2024-01-24 12:10:13 +01:00
zero
d87be16dd3 spec: update DAO section with recent ElGamalEncryptedNote fixes. 2024-01-24 12:10:11 +01:00
lunar-mining
949f9f0f6f net: remove advertise bool from settings
instead use the presence of an external addresses to decide whether or
not our address should be broadcasted.
2024-01-24 11:20:15 +01:00
lunar-mining
831d17cd48 chore: more informational debug statement 2024-01-24 11:08:54 +01:00
lunar-mining
b1511b991a chore: correct debug statements and code comments 2024-01-24 10:18:28 +01:00
lunar-mining
fe95e34db5 chore: remove artifact from debug statement 2024-01-24 10:11:52 +01:00
lunar-mining
7f3d43f538 protocol_address/seed: don't return if ping_node is false
this would mean that if the first external addr in our list is invalid
it will exit the function. instead, continue to check each addr, and if
they are all invalid just broadcast an empty vector inside the AddrsMessage.
2024-01-24 09:56:03 +01:00
lunar-mining
453a712b9e refinery: only refine nodes that match our transports
this commit means each node's whitelist will only consist of nodes that match their own transports.
2024-01-24 08:00:41 +01:00
parazyd
badd907efc hosts: Wrap module rustdoc 2024-01-23 18:01:04 +01:00
parazyd
2fc0ceeccf net/hosts/refinery: Attempt to fetch exclusive greylist lock before pinging 2024-01-23 17:55:20 +01:00
parazyd
cf2a5fcc44 darkirc: Add "hostlist" to config 2024-01-23 17:26:59 +01:00
parazyd
39f7a8828a net/settings: Do not write a default hostlist to the filesystem. 2024-01-23 17:25:06 +01:00
zero
7ada52b28b rename mod_r_p() -> fp_mod_fv(), and mod_p_r_unsafe() -> fv_mod_fp_unsafe() 2024-01-23 16:36:19 +01:00
zero
bb3729db92 DAO::vote: verifiably encrypt the Scalar blinds used for the pedersen commits. We select values v ∈ 𝔽ᵥ such that v ∈ 𝔽ₚ also, and then use conversion functions to move between the fields before and after encrypting/decrypting. 2024-01-23 16:36:19 +01:00
zero
79c18a16ec zkvm: add VALUE_COMMIT_R_BASE 2024-01-23 16:26:15 +01:00
aggstam
342106e2ac drk2: Completions functionality added 2024-01-23 16:02:31 +02:00
aggstam
8ebcfe3222 drk2/dao: updated to latest changes 2024-01-23 16:02:04 +02:00
lunar-mining
4d4fab1c28 chore: fmt 2024-01-23 12:36:37 +01:00
parazyd
2305faefb4 validator/verification: Return an Error if there are failing txs in verifying sets 2024-01-23 12:35:01 +01:00
lunar-mining
7fa973302d net: fix death loop
previously we would downgrade disconnected hosts by putting them in the
greylist. this commit changes downgrade_host() to remove_host() and removes the host
from all known lists, including greylist, when it disconnects.

otherwise on a small network the following situation could happen:

    node B stores node A on greylist
    connects to node A, upgrades to anchorlist

    hostlist is currently: greylist: node A
                           anchorlist: node A

    node A disconnects
    hostlist is currently: greylist: node A

    node B tries to find another addr to connect to
    it's only known host is node A
        tries to reconnect
        connection fails
        goes to greylist, retries
        loops forever

removing from all hostlists is "safe" because if the node A goes back
online again it will once again be added to the greylist of node B
through the address propagation protocols.
2024-01-23 12:23:46 +01:00
lunar-mining
111226ef0e chore: fix debug path 2024-01-23 12:23:46 +01:00
lunar-mining
d404fe946a chore: fix spelling on debug statement 2024-01-23 12:23:46 +01:00
zero
e0ecada541 dao: use ElGamalEncryptedNote for DAO::vote() instead of AEAD 2024-01-23 11:22:02 +01:00
zero
56cc2b1627 switch DAO auth enc to use ElGamalEncryptedNote from SDK 2024-01-23 11:00:29 +01:00
lunar-mining
63619cf061 outbound_session: downgrade host if we fail to connect 2024-01-23 10:39:17 +01:00
Dastan-glitch
2f0d966491 update darkirc tmux test session 2024-01-23 05:16:38 +03:00
aggstam
f9683b867e drk2: Token functionality added 2024-01-22 20:33:18 +02:00
aggstam
531ead2cb5 drk2: OTC swap functionality added 2024-01-22 16:26:07 +02:00
aggstam
31dd5d6208 drk2: Transfer functionality added 2024-01-22 15:34:37 +02:00
parazyd
c25cc17321 rpc/client: Trigger request-read-skip when receiving JSON notifications 2024-01-22 14:13:17 +01:00
zero
49c1b1c1ec spec: add note DH in-band secret distribution 2024-01-22 13:18:16 +01:00
aggstam
1fcbfdded9 drk2: Explorer functionality added 2024-01-22 14:03:41 +02:00
aggstam
0317510dd7 sdk/crypto/diffie_hellman: remove unused import 2024-01-22 14:03:19 +02:00
zero
36a36b1728 kdf_sapling(): add comment about non-constant function call edge case. 2024-01-22 11:09:47 +01:00
zero
51440e732f sdk/crypto/diffie_hellman: remove .clear_cofactor() call which is useless with Pallas/Vesta curves in sapling_ka_agree(). 2024-01-22 10:52:33 +01:00
aggstam
613f3b3445 net/settings: use default value for hostlist if not present in args/config 2024-01-21 23:42:04 +02:00