Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit c4a2fe7

Browse files
committed
Fix conflicts
2 parents c993a83 + fafe00c commit c4a2fe7

733 files changed

Lines changed: 21956 additions & 19891 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,9 @@ ModelManifest.xml
257257
/src/Stratis.FederatedSidechains.AdminDashboard/wwwroot/css/*.min.css
258258
/src/Stratis.FederatedSidechains.AdminDashboard/wwwroot/js/*.min.js
259259
/src/Stratis.FederatedSidechains.AdminDashboard/wwwroot/lib
260+
261+
src/.idea/.idea.Stratis.Bitcoin.FullNode/.idea/
262+
263+
.DS_Store
264+
265+
*.iml
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true">
3+
<targets>
4+
5+
<!-- BLOCK STORE -->
6+
<target name="debugBlockStoreFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
7+
<target xsi:type="File" fileName="blockstore.txt" archiveNumbering="Date" maxArchiveFiles="3" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" />
8+
</target>
9+
10+
<!-- CONSENSUS -->
11+
<target name="debugConsensusFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
12+
<target xsi:type="File" fileName="consensus.txt" archiveNumbering="Date" maxArchiveFiles="3" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" />
13+
</target>
14+
<target name="debugCoinViewsFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
15+
<target xsi:type="File" fileName="coinview.txt" archiveNumbering="Date" maxArchiveFiles="3" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" />
16+
</target>
17+
18+
<!-- MINER -->
19+
<target name="debugMinerFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
20+
<target xsi:type="File" fileName="miner.txt" archiveNumbering="Date" maxArchiveFiles="3" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" />
21+
</target>
22+
23+
<!-- CMB -->
24+
<target name="debugCMBFile" xsi:type="AsyncWrapper" queueLimit="10000" overflowAction="Block" batchSize="1000">
25+
<target xsi:type="File" fileName="CBM.txt" archiveNumbering="Date" maxArchiveFiles="3" archiveEvery="Day" layout="[${longdate:universalTime=true} ${threadid}${mdlc:item=id}] ${level:uppercase=true}: ${callsite} ${message}" encoding="utf-8" />
26+
</target>
27+
28+
<target xsi:type="null" name="null" formatMessage="false" />
29+
</targets>
30+
<rules>
31+
<!-- Avoid logging to incorrect folder before the logging initialization is done. If you want to see those logging messages, comment out this line, but your log file will be somewhere else. -->
32+
<logger name="*" minlevel="Trace" writeTo="null" final="true" />
33+
34+
<logger name="Stratis.Bitcoin.Features.BlockStore.*" minlevel="Debug" writeTo="debugBlockStoreFile" />
35+
36+
<logger name="Stratis.Bitcoin.Features.Consensus.*" minlevel="Debug" writeTo="debugConsensusFile" />
37+
<logger name="Stratis.Bitcoin.Consensus.*" minlevel="Debug" writeTo="debugConsensusFile" />
38+
<logger name="Stratis.Features.FederatedPeg.Collateral.CheckCollateralFullValidationRule" minlevel="Debug" writeTo="debugConsensusFile" />
39+
40+
<logger name="Stratis.Bitcoin.Features.Consensus.CoinViews.*" minlevel="Debug" writeTo="debugCoinViewsFile" />
41+
42+
<logger name="Stratis.Bitcoin.Features.Miner.*" minlevel="Debug" writeTo="debugMinerFile" />
43+
<logger name="Stratis.Bitcoin.Features.PoA.PoAMiner" minlevel="Debug" writeTo="debugMinerFile" />
44+
<logger name="Stratis.Features.FederatedPeg.Collateral.CollateralPoAMiner" minlevel="Debug" writeTo="debugMinerFile" />
45+
46+
<logger name="Stratis.Bitcoin.Consensus.ConsensusManagerBehavior" minlevel="Debug" writeTo="debugCMBFile" />
47+
<logger name="Stratis.Bitcoin.Features.Consensus.Behaviors.ProvenHeadersConsensusManagerBehavior" minlevel="Debug" writeTo="debugCMBFile" />
48+
<logger name="Stratis.Bitcoin.Features.PoA.Behaviors.PoAConsensusManagerBehavior" minlevel="Debug" writeTo="debugCMBFile" />
49+
</rules>
50+
</nlog>

Documentation/NLog.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102

103103
<logger name="Stratis.Bitcoin.Features.Consensus.*" minlevel="Trace" writeTo="debugConsensusFile" />
104104
<logger name="Stratis.Bitcoin.Consensus.*" minlevel="Trace" writeTo="debugConsensusFile" />
105+
<logger name="Stratis.Features.FederatedPeg.Collateral.CheckCollateralFullValidationRule" minlevel="Debug" writeTo="debugConsensusFile" />
105106

106107
<logger name="Stratis.Bitcoin.Consensus.ChainedHeaderTree" minlevel="Trace" writeTo="debugCHTandCMFile" />
107108
<logger name="Stratis.Bitcoin.Consensus.ConsensusManager" minlevel="Trace" writeTo="debugCHTandCMFile" />
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## COLD STAKING SETUP INSTRUCTIONS
2+
3+
**What you will need**
4+
5+
- **Hot wallet** - this will be used for staking online, you can skip this if you are using a cold staking service
6+
- **Cold wallet** - this will hold your funds offline
7+
8+
_Please note. It's important that both wallets are used with separate full nodes instances, and are not present in the same data folder._
9+
10+
---
11+
****Hot Wallet****
12+
13+
_If you are using a cold staking service, your **coldstakinghotaddress** will be provided for you on their website and you can skip this section._
14+
15+
**1.1.** Convert your Hot wallet to be enable cold staking by using the the `cold-staking-account` API method with isColdWalletAccount set to "false" <br />
16+
**1.2.** Get your Hot wallets coldstakinghotaddress using by using the `cold-staking-address` API method with "IsColdWalletAddress" set to "false"<br />
17+
**1.3.** Then start the node staking with the Hot wallet from the command line or config file.
18+
19+
---
20+
****Cold wallet****
21+
22+
**2.1.** Fund the Cold wallet with coins that you eventually want to stake, these coins should go into the standard "account 0".<br />
23+
**2.2.** Convert your Cold wallet to be enabled for cold staking by using the `cold-staking-account` API method with "isColdWalletAccount" set to "true"<br />
24+
**2.3.** Get your Cold wallets coldstakingcoldaddress using by using the `cold-staking-address` API method with "IsColdWalletAddress" set to "true"<br />
25+
**2.4.** Then, call the `setup-cold-staking` API to build the transaction, linking the funds in your Cold Wallet Address (Step #2.3) to the Hot Wallet Address (Step #1.2). This will return the hex that you use in the next step.
26+
27+
```
28+
{
29+
"coldWalletAddress": "<<coldstakingcoldaddress>>",
30+
"hotWalletAddress": "<<coldstakinghotaddress>>",
31+
"walletName": "<<coldwalletname>>",
32+
"walletPassword": "<<coldwalletpassword>>",
33+
"walletAccount": "account 0",
34+
"amount": "<<amount to stake>>",
35+
"fees": "0.0002"
36+
}
37+
```
38+
39+
**2.5.** Finally, you use the "send-transaction" API to broadcast the transaction from step #2.4.
40+
41+
---
42+
43+
## To withdraw funds back to your regular wallet
44+
45+
**3.1.** From the PC running your cold wallet, call the "cold-staking-withdrawal" API to build a transaction and return coins from the Hot Wallet Address to Cold Wallet Address (account 0). This will return the hex that you use in the next step.
46+
47+
```
48+
{
49+
"receivingAddress": "<<cold wallet address/ account 0>>",
50+
"walletName": "<<coldwalletname>>",
51+
"walletPassword": "<<coldwalletpassword>>",
52+
"amount": "<<amount to to return>>",
53+
"fees": "0.0001"
54+
}
55+
```
56+
57+
**3.2.** Then simply use the "send-transaction" API to broadcast the transaction hex from step #3.1.

PushNuget.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ rm "src\Stratis.Bitcoin.Networks\bin\debug\" -Recurse -Force
6161
dotnet pack src\Stratis.Bitcoin.Networks --configuration Debug --include-source --include-symbols
6262
dotnet nuget push "src\Stratis.Bitcoin.Networks\bin\debug\*.symbols.nupkg" --source "https://api.nuget.org/v3/index.json"
6363

64+
rm "src\Stratis.Features.Collateral\bin\debug\" -Recurse -Force
65+
dotnet pack src\Stratis.Features.Collateral --configuration Debug --include-source --include-symbols
66+
dotnet nuget push "src\Stratis.Features.Collateral\bin\debug\*.symbols.nupkg" --source "https://api.nuget.org/v3/index.json"
67+
68+
rm "src\Stratis.Features.FederatedPeg\bin\debug\" -Recurse -Force
69+
dotnet pack src\Stratis.Features.FederatedPeg --configuration Debug --include-source --include-symbols
70+
dotnet nuget push "src\Stratis.Features.FederatedPeg\bin\debug\*.symbols.nupkg" --source "https://api.nuget.org/v3/index.json"
71+
6472
# TESTS PROJECTS
6573
rm "src\Stratis.Bitcoin.IntegrationTests.Common\bin\debug\" -Recurse -Force
6674
dotnet pack src\Stratis.Bitcoin.IntegrationTests.Common --configuration Debug --include-source --include-symbols

PushSCNuget.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$packageNames = @("Stratis.SmartContracts.RuntimeObserver", "Stratis.SmartContracts.Core", "Stratis.SmartContracts.CLR", "Stratis.SmartContracts.CLR.Validation", "Stratis.SmartContracts.Standards", "Stratis.Bitcoin.Features.SmartContracts")
1+
$packageNames = @("Stratis.Sidechains.Networks","Stratis.SmartContracts.CLR", "Stratis.SmartContracts.CLR.Validation", "Stratis.SmartContracts.Core", "Stratis.SmartContracts.Networks","Stratis.SmartContracts.RuntimeObserver", "Stratis.Bitcoin.Features.SmartContracts")
22

33
# A little gross to have to enter src/ and then go back after, but this is where the file is atm
44
cd "src"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ Sidechains, Private/Permissioned blockchain, Compiled Smart Contracts, NTumbleBi
6060
Running a FullNode
6161
------------------
6262

63-
Our full node is currently in alpha.
63+
The master branch is actively developed and regularly committed to, and it can become unstable.
64+
To compile a stable (production) release use any of the release tags form version 3.0.x.x and upwards.
6465

6566
```
6667
git clone https://github.com/stratisproject/StratisBitcoinFullNode.git

0 commit comments

Comments
 (0)