Commit Graph

259 Commits

Author SHA1 Message Date
skoupidi
f1f05b726d darkfid: created task to listen for appended proposals and perform finalization check for non mining nodes 2024-02-13 13:45:13 +02:00
skoupidi
d81be20ec1 src/error.rs: minor cleanup 2024-02-09 17:20:04 +02:00
skoupidi
c3f84d3abb src/wallet: yeet 2024-01-25 19:06:37 +02:00
parazyd
d3fae80d5a chore: Update copyright year in license headers 2024-01-18 19:30:56 +01:00
aggstam
a318bb3d76 validator: check if proposal already exists when looking ofr its fork index
This also solves the bug where when appending a dublicated proposal, a new duplicate fork being created, resulting in never finalizing, as forks of same height existed
2024-01-18 19:30:31 +01:00
lunar-mining
ca885a43ee store: improve error naming
Error::InvalidIndex -> Error::HostDoesNotExist
2023-12-30 12:05:47 +01:00
lunar-mining
c0a47457f8 net: BUGFIX: stop duplicate entries in greylist
check if we have the peer and update it's last seen if we do.
this commit also standardizes the format of send_my_addrs across
ProtocolSeed and ProtocolAddr, so we can perhaps extract the
functionality to protocol/mod.rs at some point.
2023-12-29 17:19:11 +01:00
x
46a89b1b09 dao test: manually build the call tree 2023-12-22 11:07:01 +00:00
parazyd
64ef7c9634 validator: Implement basic tx fee validation 2023-12-19 18:01:44 +01:00
aggstam
d958bafdf4 validator/verification: validate contract calls vector indexes 2023-12-18 16:35:06 +02:00
aggstam
cdaddfbfe2 event_graph: introduce layers to the DAG
Each event corresponds to a specific layer(height) in the dag, making identifying and preventing cycles way easier, as all parents must exist in previous layers. Additionally, propagation and sync gremlins have been eliminated, and proper validations added
2023-12-14 11:45:32 +01:00
parazyd
0fc67d63b6 runtime: Clean up db/db_init() 2023-12-01 15:05:32 +01:00
x
cb300876cf zk::debug::zkas_check_types(): also check witnesses.len() matches for both circuit and binary 2023-10-30 09:31:22 +01:00
x
44b882859e add module zk::debug, and move export_witness_json() and zkas_type_checks() inside it. 2023-10-30 09:23:14 +01:00
parazyd
d1b84ca832 net: Disconnect peers which send us packets that we don't have dispatchers for. 2023-10-26 20:56:12 +02:00
aggstam
893ea4a52f validator/pow: store block difficulty info in sled 2023-10-13 19:40:18 +03:00
aggstam
594946044e validator/pow: TODOs cleanup 2023-10-13 16:48:13 +03:00
aggstam
c847febc51 validator/consensus: fork/block ranking implemented 2023-10-06 17:38:44 +03:00
aggstam
6ad2a19bac validator: validate blocks based on their version 2023-10-03 21:45:28 +03:00
aggstam
214a4f458d darkfid2: (very) raw miner task added 2023-09-21 18:40:15 +03:00
aggstam
0d0740d331 blockchain/Block: removed slots vector, and handle storing based on block version.
With these changes, BlockInfo now represents a wrapper over Block, as it becomes constant/final in terms of structure. All extra data based on block versions go to BlockInfo, and their storage is handled accordingly.
2023-09-15 00:51:37 +03:00
aggstam
eca2c7e175 blockchain/Block: moved producer tx at last position of blocks' txs vec 2023-09-15 00:51:37 +03:00
parazyd
7861949a64 event-graph: DAG sync concept 2023-09-08 16:41:46 +02:00
parazyd
ab7a6af93a rpc/client: Refactor to use StoppableTask 2023-08-31 12:29:35 +02:00
parazyd
14fc49a7d6 rpc/server: Implement connection tracking through a StoppableTaskPtr set. 2023-08-31 01:19:22 +02:00
x
e481bd8bae add Error::SeedFailed 2023-08-30 10:33:01 +02:00
parazyd
8f46f7b777 lib: Clean up library features. 2023-08-29 13:08:35 +02:00
Dastan-glitch
71ec99e422 src/error: add forgotten event_graph error 2023-08-27 06:22:03 +03:00
x
2db408de14 p2p: greatly simplify & delet kod. p2p doesnt need a StoppableTask - the sessions themselves create their own StoppableTasks when calling start() and yield immediately. 2023-08-24 11:36:31 +02:00
x
21df1a2f52 add assert_err macro 2023-08-24 11:16:26 +02:00
parazyd
0f125fa2db net: Remove async-std dependency and prefer smol.
Also we now take the global executor and keep it around in P2p.
2023-08-22 15:07:48 +02:00
aggstam
fb0102a7e0 taud: use StoppableTask instead of detach() 2023-08-22 01:39:57 +03:00
aggstam
3f6b79908b darkfid: use StoppableTask instead of detach() 2023-08-21 19:15:43 +03:00
aggstam
dbe413d8f0 darkfid2: use StoppableTask instead of detach() 2023-08-21 19:01:16 +03:00
parazyd
21dd80ae99 rpc: Replace serde_json with tinyjson. 2023-08-20 18:53:52 +02:00
parazyd
827ec53f63 rpc: Cleanup client and server and refactor into smaller functions.
* Implement a read timeout to avoid a DoS path
* Use dynamic buffer allocation with a max size limit
* Make the JSON-RPC a line-based protocol
2023-08-18 08:56:54 +02:00
aggstam
67d5ed7d28 validator: current slot generation added 2023-08-04 18:42:05 +03:00
parazyd
688da857a8 fud: Implement background tasks for fetching file metadata and file chunks. 2023-07-31 15:50:50 +02:00
parazyd
98a78098bc fud/proto: Implement file request handler 2023-07-29 14:07:40 +02:00
parazyd
63a408c777 fud/proto: Implement chunk request handler. 2023-07-29 12:57:57 +02:00
parazyd
eab4086b15 dht2: Remove module. 2023-07-29 11:46:24 +02:00
aggstam
9f81e693ed darkfid2/rpc: basic tx methods added 2023-07-18 19:00:52 +03:00
aggstam
7f9bed8e50 WIP: contract/consensus/client/proposal: verify coin value is less than slot target before creating proof 2023-07-14 14:01:20 +03:00
aggstam
dce1fb929d darkfid2: calculate genesis txs total and use that for genesis block validation 2023-07-12 20:23:31 +03:00
aggstam
9712efdfb1 validator/consensus/pid: sigmas caclulation foundation 2023-07-07 16:43:48 +03:00
aggstam
b21e787319 error: restore missing error 2023-07-05 16:54:00 +03:00
parazyd
a654341ea4 Remove some unnecessary dependencies. 2023-07-04 23:52:30 +02:00
parazyd
3546af6c79 lilith: Support versioning of spawned networks. 2023-07-03 17:35:33 +02:00
aggstam
bca71304f9 validator: full block validation added 2023-07-01 18:54:33 +03:00
parazyd
55ee919906 net: Perform full p2p code cleanup and improve certain pieces.
Notable changes:

* Rewritten transport protocols into Dialer and Listener (Nym is TODO)

  This simplifies using the transports a lot, as can be seen for example
  in src/rpc, and generally around the p2p library. It also defines features
  for each transport (all of which are enabled by default). We drop the
  socks client for Tor and Nym and use first-class support with the Arti Tor
  library, and nym-sphinx/nym-websockets (to be used with nym-client).

* Outbound session healing

  The outbound session will now poll and try to fill all the requested
  slots more efficiently, and if needed, will activate peer discovery to
  find more peers if we can't connect to any known ones. Also if we're
  unable to connect to any, we shall drop them from our set.

  Additionally, transport mixing is enabled by default, so when we're
  allowing transport mixing, and we use Tor, we will also be able to connect
  to other transports that Tor can connect to (e.g. tcp://).

* Unix socket transport dropped

  We haven't been using this, and it seems we're not going down this path,
  so the code has been obsoleted and removed.

* TLS session verification

  We fully verify server and client TLS certificates upon connection so
  we're able to perform TLS1.3 with forward secrecy.

* lilith pruning

  lilith now periodically prunes known peers from its sets if it's unable
  to connect to them.
2023-06-29 13:13:15 +02:00