RunOnFlux / fluxd

Flux Daemon
https://runonflux.io
MIT License
78 stars 43 forks source link

Add the ability to allow Pay-2-Script-Hash (Multisig) address balances to be used as fluxnode collateral. #223

Closed blondfrogs closed 10 months ago

blondfrogs commented 1 year ago

c15ff0b2cda42c067ec77e82ce17a1cf0209b6b5 - Modify the main CTransaction functions to include new required parameters. Came up with new Tx Version Flow that we can use to make fluxnode Tx changes easier. Modified how the network and database will be able to process the new type of FluxNode Tx.

1fcbc06fd189e8c817ac71a8ba30173ef0409bcf - Added the forking code into the consensus parameters so we can choose when to enable P2SH Nodes on the network.

ff18e7162acda0c3b55d733931446ba6f7cae477 - Added Core Checks for P2SH Node Transaction validation. Including signature validation with custom error message, RedeemScript and CollateralPubKey validation, RedeemScript and ScriptPubKey Validation

eda42534d9a88b93869bbc2d88300e197d251728 - Added Google Test that go through all Core Checks needed for P2SH Nodes including: Valid Data checks, and Invalid Data checks. We also verifying that the serialization of the transaction with the redeem script works. When P2SH nodes goes active, all new version will use the updated v6 Start node transactions by default

4a3cd7ecfbeee78484755bca656d01b75a639670 - Added new rpc calls to help build, sign, send p2sh startnode transactions

c57f1bed94012e87f3fd3365e9b9987122091286 - Added descriptions and correct parameter checks to new rpc calls

New RPC Calls are

Tests :

Not yet done:

gitguardian[bot] commented 12 months ago

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | Secret | Commit | Filename | | | -------------- | ------------------------- | ---------------- | --------------- | -------------------- | | [8398275](https://dashboard.gitguardian.com/incidents/8398275?occurrence=119951523) | Generic High Entropy Secret | 9c3240b503ca2cef4d102c475e0e2acfea6a7d91 | src/test/key_tests.cpp | [View secret](https://github.com/RunOnFlux/fluxd/commit/9c3240b503ca2cef4d102c475e0e2acfea6a7d91#diff-7739c9f73139013ca1ddd4a41411d10753057ddc559e6da4927685a355c6bc10L28) | | [8398276](https://dashboard.gitguardian.com/incidents/8398276?occurrence=119951524) | Generic High Entropy Secret | 9c3240b503ca2cef4d102c475e0e2acfea6a7d91 | src/test/key_tests.cpp | [View secret](https://github.com/RunOnFlux/fluxd/commit/9c3240b503ca2cef4d102c475e0e2acfea6a7d91#diff-7739c9f73139013ca1ddd4a41411d10753057ddc559e6da4927685a355c6bc10L27) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/detectors/generics/generic_high_entropy_secret#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!