Commit Graph

242 Commits

Author SHA1 Message Date
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
aggstam
97445fca25 blockchain: cleanup 2023-06-28 18:29:46 +03:00
aggstam
feabf5a67a blockchain: rewrite completed
Attention: this commit breaks darkfid/faucetd network functionalities, so nodes can't sync or participate in the protocol. Wait for their rewrite(TM)
2023-06-28 14:42:14 +03:00
aggstam
7a2f07502c WIP: validator: blockchain rewrite foundation added 2023-06-26 22:02:25 +03:00
aggstam
ec97e969c8 sdk: renamed SlotCheckpoint to Slot 2023-06-24 18:18:08 +03:00
aggstam
0afaf50d65 contract/test-harness: integrate new validator 2023-06-23 16:12:14 +03:00
aggstam
dd3d6a15e7 src/validator: set foundation for validator rewrite 2023-06-23 12:49:09 +03:00
parazyd
bc9b25bf1f error: Correct error string for wasm failed exit 2023-05-24 13:13:25 +02:00
parazyd
0cbaa2bcac dht: Stub protocols for metadata request-reply. 2023-05-12 21:52:27 +02:00
parazyd
293f74b301 dht: WIP implementation of filesystem-based DHT 2023-05-12 11:26:19 +02:00
aggstam
9214522a79 consensus/validator.rs: verify_transactions refactor and erroneous txs handling
Tests pass, still need to be tested in live conditions of node running
2023-03-17 23:59:19 +02:00
aggstam
7d3090f1ed runtime: Make all the writes atomic in a transaction over all trees 2023-03-09 19:59:46 +02:00
police
e4cb9aca8d update dashu new 0.3 api from main repo 2023-02-27 02:05:03 +02:00
aggstam
2ac20a6f39 contract: minor fixes
dao contract needs to be updated with the new money API
2023-02-25 14:20:29 +01:00
aggstam
3f6fc0d7af consensus: simplyfied total stake calculation and removed slot offset logic 2023-01-15 17:47:11 +02:00
parazyd
4c4132ce7e consensus/types: Wrap Float10 into our own struct for some code simplification. 2023-01-04 15:15:20 +01:00
parazyd
71cd3064d6 Update license year. 2022-12-28 13:06:00 +01:00
aggstam
f2da17ea1e consensus: verify proposer eligibility via coin age 2022-12-18 02:02:33 +02:00