Commit Graph

325 Commits

Author SHA1 Message Date
aggstam
361e53af0c darkfid2/tests: use genesis stake and mint in genesis block 2023-07-12 22:03:29 +03:00
aggstam
dce1fb929d darkfid2: calculate genesis txs total and use that for genesis block validation 2023-07-12 20:23:31 +03:00
parazyd
42b3cfd8c7 contract/dao: Fix tests 2023-07-12 12:30:12 +02:00
parazyd
bcd98952a7 contract/money: Implement support for dummy inputs. 2023-07-12 11:39:28 +02:00
parazyd
3f7031eca2 wallet: Reintroduce sqlcipher. 2023-07-11 13:24:15 +02:00
parazyd
98ef7c834e chore: Update project dependencies. 2023-07-08 20:17:47 +02:00
aggstam
c7b7c2dd11 contract/test-harness/vks: updated VKS_HASH 2023-07-08 15:28:29 +03:00
aggstam
9712efdfb1 validator/consensus/pid: sigmas caclulation foundation 2023-07-07 16:43:48 +03:00
aggstam
9758c6c01f repo: fixed tests 2023-07-04 17:23:20 +03:00
aggstam
0d00179abd darkfid2: further extend tests foundation | repo: fmt 2023-07-03 16:50:44 +03:00
aggstam
a3d04e0b46 bin/darkfid2: set foundation for implementing new darkfid 2023-07-03 14:35:56 +03:00
aggstam
6fa4049a1b Make Repo Great Again 2023-06-29 17:29:23 +03:00
aggstam
611bd9734b Missing rustqlite bundled-sqlcipher feature added 2023-06-29 15:06:47 +03:00
aggstam
abc8290b9f Makefile: use nightly toolchain 2023-06-29 15:03:18 +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
c77ed67df1 validator: decoupled verification functions so we can chain them using same overlay 2023-06-28 20:52:29 +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
ec97e969c8 sdk: renamed SlotCheckpoint to Slot 2023-06-24 18:18:08 +03:00
aggstam
2e8b956073 contract/consensus/proof/proposal: minor formatting 2023-06-24 16:21:51 +03:00
aggstam
7deaab24e1 src: moved SlotCheckpoint to sdk so it can be used by contracts 2023-06-24 15:59:45 +03:00
aggstam
80acf6baed contract/dao: integrate new validator 2023-06-23 16:44:55 +03:00
aggstam
703986909a contract/consensus: enable proper nullifiers check on stake and unstake 2023-06-23 16:17:25 +03:00
aggstam
0afaf50d65 contract/test-harness: integrate new validator 2023-06-23 16:12:14 +03:00
aggstam
d763fc154f contract/test-harness/consensus_proposal: typo 2023-06-22 16:21:54 +03:00
ertosns
7b1bb391be [research/lotterysim] edit cascade report 2023-06-22 16:13:23 +03:00
aggstam
0e83156cdd src: removed coin_blind references 2023-06-19 21:30:28 +03:00
aggstam
2196f32c02 contract/dao: removed coin blind from hashes 2023-06-19 21:25:20 +03:00
aggstam
e969004907 contract/money: removed coin blind for hashes 2023-06-19 19:28:57 +03:00
aggstam
b7b26c77b6 contract/consensus: removed coin blind for hashes 2023-06-19 18:56:19 +03:00
aggstam
5e3aa99f32 contract/consensus: cleanup 2023-06-16 22:11:58 +03:00
ertosns
7a98f5c273 [src/contract/consensus] sk is non-resettable 2023-06-16 21:49:01 +03:00
aggstam
19b70a8d4b contract/money/tests/mint_pay_swap: migrated to new contract/test-harness plus some minor cleanups
assert_trees() might seem placed randomly, but its not! Since we add stuff to each holder's merkle tree asyncronously, we have to ensure that everyone has added everything(along with gathering their coin) before asserting. Ignore any typos, its getting late...
2023-06-15 04:46:24 +03:00
aggstam
7fcc5953ff contract/money/tests/verification_bench: migrated to new contract/test-harness plus some minor cleanups 2023-06-15 02:16:31 +03:00
aggstam
7bbd7f8d05 contract/money/tests/txs_verification: migrated to new contract/test-harness plus some minor cleanups 2023-06-14 23:45:46 +03:00
aggstam
d540853309 contract/test-harness: minor cleanup 2023-06-14 23:11:14 +03:00
aggstam
b69e017a5b contract/money/tests/money_genesis_mint|money_transfer: migrated to new contract/test-harness 2023-06-14 23:04:08 +03:00
aggstam
4b2fdc2fbd contract/money/tests/integration.rs: tree checks added 2023-06-14 23:04:08 +03:00
aggstam
9446fba4c1 chore: clippy 2023-06-14 19:16:26 +03:00
aggstam
410ab42b54 contract/consensus: migrated tests to new contract/test-harness 2023-06-14 19:02:28 +03:00
parazyd
33c286f19f contract/dao: Introduce money state snapshotting.
This prevents double-voting in the sense of minting new coins _after_
a proposal was created, meaning only the coins that have existed prior
to creating a certain proposal are able to vote on it.

This is done by marking down the latest Merkle root in the Money state
and attaching it to the proposal's metadata. Then this root is used for
verifying inclusion proofs when voting.
2023-06-14 14:41:24 +02:00
parazyd
7ec7d9244f runtime/merkle: Introduce pointers to latest merkle roots in merkle_add()
Also migrate all the contracts that use merkle_add to this API.

This is the better approach, since it avoids having to run redundant
operations like lots of hashing when we want to retrieve the latest
Merkle root in some tree. It is too expensive to do it directly in WASM,
so doing this through the injected host function allows us to price it
more accordingly.
2023-06-14 13:32:23 +02:00
parazyd
0b3769acd8 contract/money: Use test-harness for integration test. 2023-06-14 02:33:54 +02:00
parazyd
a2ddbcd4f8 contract: WIP implementation of generic test harness for native contracts. 2023-06-14 02:32:56 +02:00
parazyd
b36861fa1d contract/dao: Refactor contract code to match other native contracts. 2023-06-13 14:23:33 +02:00
parazyd
8a21449cfc contract/money: Constrain spend_hook in ZK when burning coins. 2023-06-12 15:12:12 +02:00
parazyd
0feda5f8e5 contract/dao: Use AeadEncryptedNote from darkfi-sdk. 2023-06-12 15:03:24 +02:00
parazyd
afa34c59b1 contract/consensus: Replace incrementalmerkletree with bridgetree crate. 2023-06-12 14:31:20 +02:00
parazyd
48ce9fd7c5 chore: Update crate dependencies 2023-06-12 14:31:20 +02:00
parazyd
7cc0f78159 contract/consensus: Replace incrementalmerkletree with bridgetree 2023-06-12 14:31:19 +02:00
parazyd
326fa7e2d1 contract/dao: Replace incrementalmerkletree with bridgetree crate. 2023-06-12 14:31:19 +02:00