Commit Graph

110 Commits

Author SHA1 Message Date
parazyd
511b072c25 validator/verification: Allow fee call at any place in the transaction 2024-01-15 15:58:08 +01:00
aggstam
7c9b3549cf darkfid2: use minerd to mine blocks, validator: cleaned up threads info as its not longer required 2024-01-12 15:03:42 +02:00
aggstam
dc882d256b validator:pow: decoulbed mine_block() from PowModule so it can be used outside of it 2024-01-11 16:34:37 +02:00
parazyd
036afda345 validator: Configurable fee verification, incomplete
It's now only used in add_transactions(), but needs to be in other
places as well.
2024-01-10 16:34:05 +01:00
aggstam
e5660ce75d 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-09 18:36:09 +02:00
parazyd
6c2ba6ec6a validator: Deploy the deployooor contract as a native contract 2024-01-09 14:42:55 +01:00
parazyd
fecab39d77 validator: Move DeployParamsV1 to darkfi-sdk 2024-01-09 13:27:48 +01:00
parazyd
2ad9183239 validator: Implement contract deployment handling upon tx verification 2024-01-09 13:18:53 +01:00
parazyd
c4afe20f92 validator: Remove false comments 2023-12-26 13:35:52 +01:00
aggstam
15c44bd7bb tx: use DarkForest in TransactionBuilder 2023-12-22 20:49:40 +02:00
aggstam
af732f588f sdk/dark_tree: created DarkForest combining multiple DarkTrees 2023-12-22 20:49:40 +02:00
x
79d43e61af Revert "sdk/dark_tree: create fn to shift root in flatten vec to first position"
This reverts commit fee3385688.
2023-12-22 11:04:18 +00:00
aggstam
fee3385688 sdk/dark_tree: create fn to shift root in flatten vec to first position 2023-12-22 01:12:44 +02:00
aggstam
a4ba0b1f6b validator: producer tx on first instead of last position in block txs vector 2023-12-19 21:41:13 +02:00
parazyd
d891d2e756 validator/verification: Modify tx fee call location 2023-12-19 20:21:39 +01:00
parazyd
4aa20d40f3 validator: Port serialization to async functions 2023-12-19 18:25:29 +01:00
parazyd
64ef7c9634 validator: Implement basic tx fee validation 2023-12-19 18:01:44 +01:00
parazyd
0231beba7f validator: Add placeholder for tx fee enforcement 2023-12-19 17:26:26 +01:00
aggstam
d958bafdf4 validator/verification: validate contract calls vector indexes 2023-12-18 16:35:06 +02:00
aggstam
bd86ce5678 tx: use DarkLeaf<ContractCall> in tx calls vec 2023-12-18 16:35:06 +02:00
aggstam
bb99e816f2 validator: removed RwLock over whole struct ptr and moved to inner stuff 2023-11-30 18:44:24 +02:00
y
fd643a8d08 [validator/validation] Improve comment wording 2023-11-22 10:48:44 -05:00
y
dd471e6b06 [validator/validation] Typo and comment formatting 2023-11-22 10:22:41 -05:00
aggstam
4d3984a611 validator: renamed testing_mode to pos_testing_mode 2023-11-22 00:26:22 +02:00
y
1ffcaba5aa [validator/verication] Revert additional changes
Commit a0636984e4 is reverted a previous
commit. There were a few relevant variables that were mistakenly changed
in a previous commit and no longer pass clippy. This commit makes clippy
happy.
2023-11-21 17:16:01 -05:00
y
d70dc7da65 Revert "[validator/verification] Reject massive txs"
This reverts commit a0636984e4.
2023-11-21 17:13:22 -05:00
y
a0636984e4 [validator/verification] Reject massive txs
Add a check in verify_transaction() to reject transactions that have a
number of calls greater than the GAS_LIMIT defined in the runtime.

This prevents a potential denial-of-service vector where an attacker
could submit extremely large transactions that are guaranteed to revert
but still tie up system resources before the revert happens.
2023-11-21 16:24:17 -05:00
y
b4746761d2 [validator/verification] fix index out of bounds 2023-11-21 15:59:29 -05:00
y
6461facaaa [validator/verification] Fix typo in code comment
Change 'version 1' to 'version 2' where the Rust code matches
block_version == 2.
2023-11-21 15:32:18 -05:00
parazyd
673b0ec6b1 Full Makefile project cleanup 2023-11-21 15:58:08 +01:00
aggstam
7834a3f800 validator/pow: added fixed_difficulty greater than zero shield 2023-11-21 15:43:10 +02:00
aggstam
61d262880d chore: clippy 2023-11-21 14:56:38 +02:00
aggstam
cb06356c46 validator/pow: introduced fixed difficulty for testing purposes 2023-11-21 14:41:56 +02:00
aggstam
44482105c8 darkfid2: enchanched args configuration 2023-10-26 21:21:18 +03:00
aggstam
dcf8ce6f0a validator/utils: ultra minor tiny cleanup 2023-10-19 20:19:21 +03:00
aggstam
71b8d8d71c darkfid2/utils: moved genesis_txs_total function to src/validator/utils 2023-10-19 17:16:58 +03:00
aggstam
5f053ac265 darkfid2: proper producer tx usage 2023-10-17 16:56:50 +03:00
aggstam
1d2212ae10 validator/consensus: generate proper slots on fork creation/rebuilding 2023-10-14 15:14:03 +03:00
aggstam
4043e09330 validator/consensus: handle same ranking forks 2023-10-14 14:23:05 +03: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
8cff15a9b8 validator: handle proposals based on their version 2023-10-11 21:41:08 +03:00
aggstam
1cdad996d3 validator/consensus: cache fork rank for better performance 2023-10-06 18:29:12 +03:00
aggstam
0331a02f53 validator/consensus: use blocks previous previous VRF for ranking 2023-10-06 18:15:17 +03:00
aggstam
c847febc51 validator/consensus: fork/block ranking implemented 2023-10-06 17:38:44 +03:00
aggstam
d61cf39649 chore: naming cleanup 2023-10-05 16:21:04 +03:00
aggstam
6ad2a19bac validator: validate blocks based on their version 2023-10-03 21:45:28 +03:00
aggstam
030cbb48c9 validator/verification: validate producer signature using transaction public key 2023-10-03 16:25:29 +03:00
aggstam
b26106ffe7 validator/pow: stoppable mining 2023-09-28 16:50:18 +03:00
aggstam
10fbf5d963 validator: pow module added for mining 2023-09-20 23:32:33 +03:00