Commit Graph

94 Commits

Author SHA1 Message Date
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
aggstam
e5081d55ce blockchain/Block: refactored in preparation for mining integration 2023-09-19 00:11:20 +03:00
aggstam
01fac53e39 validator: properly test producer txs 2023-09-15 00:51:37 +03:00
aggstam
ade055d3db validator/validation,verification: perform validations based on block version 2023-09-15 00:51:37 +03:00
aggstam
45d6ffea71 validator/verification: proper producer tx handling 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
aggstam
dba13ebef6 blockchain/Block: removed producer structure 2023-09-15 00:51:37 +03:00
aggstam
b8e612138d validator/blockchain: consolidate all blockchain structures validation at src/validator/validation.rs 2023-09-14 14:39:20 +03:00
aggstam
8d7a2bde7c validator: preperation cleanup for PoW blocks integration 2023-09-13 19:22:56 +03:00
parazyd
8f46f7b777 lib: Clean up library features. 2023-08-29 13:08:35 +02:00
parazyd
2d0e3b0d89 lib: Clean up imports 2023-08-24 15:29:16 +02:00
parazyd
98703d361a lib: Add necessary traits around for async serial. 2023-08-24 14:27:03 +02:00
y
ed53f896af chore: fix typos in comments and logs 2023-08-23 09:12:40 +00:00
greptile
970698f4a9 consensus: add unit test for bounds on f (#192)
* consensus: add unit test for bounds on f

Added test f_is_bounded to src/validator/consensus/pid.rs

Test by running:
cargo test --release --all-features f_is_bounded

* fix CI error (cargo fmt)

---------

Co-authored-by: y <y>
2023-08-23 09:12:13 +00:00
parazyd
a02e3475f6 lib: Remove async-std dependency. 2023-08-22 19:55:37 +02:00
aggstam
ff581982be validator/consensus: finalization check added 2023-08-10 19:58:17 +03:00
aggstam
80ffd5afd6 validator/consensus: proposal generation implemented 2023-08-10 19:32:06 +03:00