Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor block validation logic - effects #3808

Draft
wants to merge 35 commits into
base: dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f541f9a
blockSignature function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
179a7b5
formatOfFields function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
ee167f4
version function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
41176d5
futureTransaction function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
c8d471c
transactionExpiration function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
cc5dfef
deploysShardIdentifier function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
beebdee
blockHash function moved to BlockValidationLogic
stanislavlyalin Aug 8, 2022
5972692
Removed unused
stanislavlyalin Aug 9, 2022
c1a1116
phloPrice function moved to BlockValidationLogic
stanislavlyalin Aug 9, 2022
0417ab5
Rearranged validation functions
stanislavlyalin Aug 9, 2022
be920f5
Version validation test moved to BlockValidationLogicSpec
stanislavlyalin Aug 9, 2022
0af307a
Block hash validation test moved to BlockValidationLogicSpec
stanislavlyalin Aug 9, 2022
31cd7dc
Block fields validation test moved to BlockValidationLogicSpec
stanislavlyalin Aug 9, 2022
19f56a4
Block signature validation tests moved to BlockValidationLogicSpec
stanislavlyalin Aug 9, 2022
6b5dc7f
Future deploy validation tests moved to BlockValidationLogicSpec
stanislavlyalin Aug 9, 2022
95e4a12
Deploy expiration validation tests moved to BlockValidationLogicSpec
stanislavlyalin Aug 9, 2022
48a557e
Internal function `ignore` marked private
stanislavlyalin Aug 9, 2022
962b06a
Fixed test name
stanislavlyalin Aug 9, 2022
91a6f8e
Simplified validation functions. They returns just Boolean
stanislavlyalin Aug 17, 2022
9194775
Fixed calling validation functions. Added related tests
stanislavlyalin Aug 18, 2022
e345109
Test for `formatOfFields` made generative
stanislavlyalin Aug 18, 2022
9f5a5a8
Test for block signature made generative
stanislavlyalin Aug 19, 2022
d5b040d
Test for future deploy made generative
stanislavlyalin Aug 19, 2022
2f63371
Fixed review issue: `f` evaluated always, `errorStatus` only if `f` r…
stanislavlyalin Aug 23, 2022
ddf248c
Tests for block's signature algorithm made generative
stanislavlyalin Aug 23, 2022
1375491
Refactored first test of ValidateTest with MonixTaskTest and Mockito.…
stanislavlyalin Aug 9, 2022
29eb860
Refactored two more tests
stanislavlyalin Aug 10, 2022
34026eb
Extended signature algorithm test
stanislavlyalin Aug 24, 2022
d46c9b5
Removed genesisContext and genesis
stanislavlyalin Aug 25, 2022
43be59a
Refactored createChain function
stanislavlyalin Aug 25, 2022
6cba86e
Removed signedBlock function
stanislavlyalin Aug 26, 2022
7f8e2f2
Refactored one more test
stanislavlyalin Aug 26, 2022
75e34d3
Refactored sequence number validation tests
stanislavlyalin Aug 26, 2022
c53c56d
Refactored repeat deploy validation tests
stanislavlyalin Aug 26, 2022
e494319
Refactored block summary validation tests
stanislavlyalin Aug 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Internal function ignore marked private
  • Loading branch information
stanislavlyalin committed Aug 10, 2022
commit 48a557e784234fd1b12c6a2171f37caea93d24ad
2 changes: 1 addition & 1 deletion casper/src/main/scala/coop/rchain/casper/Validate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Validate {
"secp256k1" -> Secp256k1.verify
)

def ignore(b: BlockMessage, reason: String): String =
private def ignore(b: BlockMessage, reason: String): String =
s"Ignoring block ${PrettyPrinter.buildString(b.blockHash)} because $reason"

/* Validation of block with logging included */
Expand Down