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

Feature/functional tests updates segwit p2p ibd txrelay rpc getblockfrompeer p2p addconnections #124

Open
wants to merge 183 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
505835b
fix broken URLs to the bitgesell repo
slowriot Aug 19, 2021
94666b2
reverting Bitcoin pre-fork release notes to their original content - …
slowriot Aug 19, 2021
d2fe6e6
fix broken links to bitcoin repo pull requests (broken by dumb bitcoi…
slowriot Aug 19, 2021
786dd1c
fix broken links to old bitcoin repo issues, commits and blobs (broke…
slowriot Aug 19, 2021
ca2cfa8
fixing site url, BGLcore.org -> bitgesell.ca. Note that some of thes…
slowriot Aug 19, 2021
3c0c6c4
correct python3 comparison operator
slowriot Aug 19, 2021
6ff2242
remove pull request template comment with irrelevant broken link to b…
slowriot Aug 19, 2021
0e898fe
revert unrelated changes
slowriot Aug 20, 2021
e027dc7
enable building tests by default, external signer default to match bi…
slowriot Aug 20, 2021
0f69252
reinstate valid base58 test data and test methodology from bitcoin core
slowriot Aug 20, 2021
60bc8a1
fix base58 implementation
slowriot Aug 20, 2021
9781fd3
don't disable implicit-fallthrough warning (this is now dealt with in…
slowriot Aug 24, 2021
2557ff6
WIP: Trying to solve what causes Clang fuzz compilation fail
janus Feb 19, 2022
22e1641
Version bump
Apr 3, 2022
a2972fc
Icons and resources update for new branding
Apr 3, 2022
ae6aae5
Branding updates, version updates, build fixes, package updates
Apr 5, 2022
2b5616f
Add missing include file (OSX compilation)
Apr 5, 2022
29eed96
Merge pull request #80 from BitgesellOfficial/sync/master202204
van-orton Apr 5, 2022
76a046d
actualize functional tests
madnadyka Jul 8, 2022
ea3713b
Merge pull request #83 from madnadyka/functional_tests_actualization
madnadyka Jul 8, 2022
1733768
mempool_ * test updates and fixes #50 PR
madnadyka Jul 8, 2022
fccfad7
Merge remote-tracking branch 'slowriot/url_fix' into slowriot-url_fix
madnadyka Jul 8, 2022
6aa62ea
Merge branch 'BitgesellOfficial:master' into mempool_tests_update
madnadyka Jul 8, 2022
92a6379
Merge remote-tracking branch 'slowriot/base58_fixes' into slowriot-ba…
madnadyka Jul 8, 2022
5a5c764
resolve incorrect merge
madnadyka Jul 8, 2022
de8e9c7
Merge branch 'slowriot-url_fix' into master_bgl
madnadyka Jul 8, 2022
4e96ced
Merge pull request #84 from madnadyka/mempool_tests_update
van-orton Jul 12, 2022
742c1f6
Update README.md
wu-emma Aug 5, 2022
0d3b950
generate seeds update
madnadyka Aug 22, 2022
418082a
contrib: refactor: simplify block header string routine in linearize-…
theStack Feb 17, 2022
c6662a1
contrib: refactor: replace `hex_switchEndian` in linearize scripts
theStack Feb 17, 2022
a9b6f0d
test, contrib, refactor: use `with` when opening a file
brunoerg Apr 26, 2022
8149eb3
Add search for first blk file with pruned node
Rjected Oct 28, 2019
1c70d01
test/functional/feature_loadblock: Fix BGL Regtest network magic value.
gitcoindev Oct 24, 2022
81b9662
contrib/linearize/linearize-data: Update linearize data to match BGL …
gitcoindev Oct 24, 2022
e34041d
test/functional/wallet_taproot: Encode correct segwit address for BGL
gitcoindev Oct 26, 2022
de81f96
wallet/sqlite: Update error message to BGLd.
gitcoindev Oct 26, 2022
93d84b8
test/functional/feature_addrman: Use keccak for BGL network.
gitcoindev Oct 26, 2022
804b17f
test/functional/data: Generate proper rpc_getblockstats for BGL network.
gitcoindev Oct 26, 2022
b2107e7
Merge pull request #89
madnadyka Oct 29, 2022
ff20ab5
Merge pull request #90
madnadyka Oct 29, 2022
fcd5bf3
Merge pull request #91
madnadyka Oct 29, 2022
a16f0bc
Merge pull request #92
madnadyka Oct 29, 2022
be1e003
Merge pull request #94
madnadyka Oct 29, 2022
88396d5
Update error message to BGLd.
madnadyka Oct 29, 2022
97ae554
Merge pull request #95 from madnadyka/fix-wallet-err-msg
madnadyka Oct 29, 2022
c4690c4
Merge pull request #86 from madnadyka/generate_seeds
madnadyka Oct 29, 2022
df64814
test/functional/p2p_segwit: Fix the test case by adjusting to BGL
gitcoindev Oct 26, 2022
fbf8c42
Merge pull request #93
madnadyka Nov 1, 2022
0b04397
wallet: Fix already-loading error message grammar
kootoopas Feb 3, 2021
2999552
test/functional/wallet_listdescriptors: Set correct descriptor for BGL
gitcoindev Nov 7, 2022
ae96576
Store pubkeys in TRDescriptor::MakeScripts
achow101 Jun 28, 2021
97be6e0
Create a tr() descriptor bech32m DescriptorScriptPubKeyMan by default
achow101 Jun 23, 2021
a41fac2
Mention bech32m in -addresstype and -changetype help
achow101 Jun 23, 2021
fca7f71
Extract Taproot internal keyid with GetKeyFromDestination
achow101 Jun 24, 2021
9d73603
test: refactor: use `set_node_times` helper in wallet_transactiontime…
theStack Nov 25, 2021
892243a
test: fix test wallet_transactiontime_rescan.py for descriptor wallets
theStack Nov 25, 2021
21197ee
test: add coverage for invalid parameters for `rescanblockchain`
brunoerg Aug 22, 2022
530b1c4
test/functional/wallet_txn_doublespend: Set correct expected coinbase
gitcoindev Nov 8, 2022
91ed9cf
test: Remove unnecessary block mining from importdescriptors test
fjahr Jun 26, 2022
d49ba19
test/functional/wallet_importdescriptors: Update expected address values
gitcoindev Nov 7, 2022
5a53fdb
test/functional/wallet_singer: Correct expected BGL network address
gitcoindev Nov 7, 2022
d0b681b
test/functional/wallet_resendwallettransactions: Wait for BGL wallet
gitcoindev Nov 9, 2022
6077c33
Update chainparams.cpp
alekcangp Nov 16, 2022
0f3ebcb
Added checkpointData for testnet
alekcangp Nov 17, 2022
3069e8b
Merge pull request #100
madnadyka Nov 21, 2022
f89e780
Merge pull request #102
madnadyka Nov 21, 2022
b1c2ef8
Merge pull request #103
madnadyka Nov 21, 2022
4685d7f
Merge pull request #105
madnadyka Nov 21, 2022
e24f629
Merge pull request #98
madnadyka Nov 21, 2022
16b01d9
Merge pull request #99
madnadyka Nov 21, 2022
3e51f97
Merge pull request #101
madnadyka Nov 21, 2022
9ba2e48
Merge pull request #104
madnadyka Nov 21, 2022
2f176ae
test/functional/tool_wallet: Increase pool size to 8.
gitcoindev Nov 22, 2022
88e41a0
Merge pull request #97
madnadyka Nov 22, 2022
45769e7
sync/fix tests
madnadyka Dec 5, 2022
02ddb3f
sync/fix tests
madnadyka Dec 6, 2022
a231ba2
sync/fix tests
madnadyka Dec 6, 2022
2fb53f5
Merge pull request #106 from madnadyka/functional_tests
madnadyka Dec 6, 2022
9253a62
rpc: Validate -rpcauth arguments
promag Nov 23, 2020
68d735d
test: Use byte unit 'M' for -maxuploadtarget functional test
dougEfresh Dec 2, 2021
0f14f5c
test: use MiniWallet for feature_maxuploadtarget.py
theStack Mar 11, 2022
adf80c8
test: pass `datacarriersize` option for tests using large outputs (in…
theStack Jun 29, 2022
0266474
test: refactor: use `create_lots_of_big_transactions` to dedup where …
theStack Apr 16, 2022
e74e943
test: feature_maxuploadtarget: Adjust test values to BGL network.
gitcoindev Dec 12, 2022
8daca1c
rpc: deprecate fee fields from mempool entries
josibake Aug 12, 2021
9fa7c1b
test: rpc_fundrawtransaction: Fix shaky test by reordering fee test c…
gitcoindev Dec 14, 2022
198336b
test: use MiniWallet for mining_basic.py
theStack Jan 4, 2022
a4b7790
src/validation: Add BGL regtest network nBits to allowed PoW values.
gitcoindev Dec 16, 2022
427e342
src/validation: Add BGL regtest network nBits to allowed PoW values.
gitcoindev Dec 16, 2022
5409c6d
test: functional: Fix feature_block test for BGL.
gitcoindev Dec 18, 2022
623be10
Add warnings field to addmultisigaddress to warn about uncompressed keys
meshcollider Dec 8, 2021
3158288
test: functional: feature_proxy: Update onion connection address.
gitcoindev Dec 20, 2022
7f0d9bc
Merge pull request #108
madnadyka Dec 21, 2022
3edfe98
Merge pull request #107
madnadyka Dec 21, 2022
0ca3395
Merge pull request #110
madnadyka Dec 21, 2022
0c1d7d2
Merge pull request #112
madnadyka Dec 21, 2022
bab6abf
Merge pull request #113
madnadyka Dec 21, 2022
f548534
Merge pull request #115
madnadyka Dec 21, 2022
358fc13
Merge pull request #114
madnadyka Dec 21, 2022
c5ee760
zmq: Fix due to invalid argument and multiple notifiers
promag Nov 11, 2019
307c9ac
test: functional: interface_zmq: Fix the test for Bitgesell.
gitcoindev Dec 20, 2022
2f3fafb
Merge pull request #116
madnadyka Dec 22, 2022
bc26051
test: p2p_dos_header_tree: Update testnet block headers for Bitgesell
gitcoindev Nov 22, 2022
0dfd8c1
chainparams: Align BGL signet genesis block initialization with the B…
gitcoindev Jan 4, 2023
fe2d5d0
test: feature_signet: Update Signet test for BGL network.
gitcoindev Jan 4, 2023
4efefb4
test: feature_coinstatsindex: Integrate missing test case from Bitcoin
gitcoindev Jan 5, 2023
c1a6185
test: feature_coinstatsindex: Adjust expected test case values to Bit…
gitcoindev Jan 5, 2023
d9afefc
test: functional: rpc_psbt: Sync with Bitcoin core and adapt expected…
gitcoindev Jan 10, 2023
b8489cd
Merge pull request #117
madnadyka Jan 14, 2023
826832a
Merge pull request #119
madnadyka Jan 14, 2023
900838a
Merge pull request #120
madnadyka Jan 14, 2023
b9fdf0f
Merge pull request #118
madnadyka Jan 14, 2023
70c6c0e
test: MiniWallet: add P2TR support and use it per default
theStack Oct 27, 2021
0d8cb3a
test: feature_utxo_set_hash: Update expected hash and serialized muha…
gitcoindev Jan 24, 2023
569528d
test: feature_coinstatsindex: update expected values due to P2TR defa…
gitcoindev Jan 24, 2023
9ed0a4a
test: feature_maxuploadtarget: Adjust loop iterations after P2TR support
gitcoindev Jan 25, 2023
d79849f
Replace thread_local g_lockstack with a mutex-protected map
hebasto May 18, 2020
ab4f3af
sync: make EnterCritical() & push_lock() type safe
vasild Jun 19, 2020
e626370
refactor: Refactor duplicated code into LockHeld()
hebasto May 18, 2020
02ed5dd
Merge pull request #122 from gitcoindev/bugfix/fix-debug-build
van-orton Feb 6, 2023
c557170
Merge pull request #121
madnadyka Feb 6, 2023
51800e3
[net_processing] ignore all transactions during ibd
glozow Feb 26, 2021
31373cc
doc: Fix incorrect C++ named args
Sep 15, 2021
ee440ca
p2p: Don't use timestamps from inbound peers
mzumsande Nov 29, 2021
5ef4b9b
Replace MakeSpan helper with Span deduction guide
sipa Nov 1, 2021
dd36160
[test] tx processing before and after ibd
glozow Feb 26, 2021
4dd1f44
rpc: getblockfrompeer
Sjors May 13, 2021
ee6a7a0
rpc: move Ensure* helpers to server_util.h
Sjors Apr 21, 2021
2ea43b4
p2p: Make timeout mockable and type safe, speed up test
Jul 10, 2020
953c316
refactor: Use type-safe std::chrono in net
Dec 13, 2021
b8ea8ff
scripted-diff: Rename touched member variables
Dec 13, 2021
306e8c8
[net processing] Do not request transaction relay from feeler connect…
jnewbery Aug 23, 2021
33704a2
[test] Add testing for outbound feeler connections
jnewbery Aug 23, 2021
251c9c8
p2p: Always serialize local timestamp for version msg
Dec 7, 2021
e84ddf0
refactor: Use type-safe std::chrono in net
Dec 13, 2021
b63703d
Use mockable time for peer connection time
Dec 13, 2021
b2aaf6b
scripted-diff: Rename touched member variables
Dec 13, 2021
06197b8
Move FindForkInGlobalIndex from BlockManager to CChainState
Nov 23, 2021
1f172b3
Change time variable type to std::chrono::seconds in src/net_processi…
shaavan Dec 17, 2021
30f486c
refactor: drop redundant hash argument from FetchBlock
Sjors Dec 8, 2021
5959307
rpc: clarify getblockfrompeer behavior when called multiple times
Sjors Dec 8, 2021
93f8fd6
rpc: more detailed errors for getblockfrompeer
Sjors Dec 8, 2021
0353651
rpc: use peer_id, block_hash for FetchBlock
Sjors Dec 10, 2021
6c338e2
Refactor: Changes remaining time variable type from int to chrono
shaavan Dec 22, 2021
9cde9fc
Refactor: Uses c++ init convention for time variables
shaavan Dec 22, 2021
6401659
refactor: Remove pointless and confusing shift in RelayAddress
Jan 4, 2022
70bf691
scripted-diff: replace PoissonNextSend with GetExponentialRand
jnewbery Apr 15, 2020
e20190f
[net processing] Move PoissonNextSendInbound to PeerManager
jnewbery Dec 14, 2021
c7fa03b
[net processing] Rename PoissonNextSendInbound to NextInvToInbounds
jnewbery Dec 14, 2021
909ffda
scripted-diff: rename `cs_SubVer` -> `m_subver_mutex`
theStack Jan 16, 2022
9690510
[move] Move PoissonNextSend to src/random and update comment
jnewbery Dec 14, 2021
067db66
[refactor] Use uint64_t and std namespace in PoissonNextSend
jnewbery May 8, 2020
739e29f
scripted-diff: replace PoissonNextSend with GetExponentialRand
jnewbery Apr 15, 2020
a3e0b97
[net processing] Move PoissonNextSendInbound to PeerManager
jnewbery Dec 14, 2021
b63d080
[net processing] Rename PoissonNextSendInbound to NextInvToInbounds
jnewbery Dec 14, 2021
b747f61
test: fancier Python for getblockfrompeer
Sjors Dec 8, 2021
4462f9b
rpc: allow empty JSON object result
Sjors Dec 13, 2021
3f54d6d
refactor: drop redundant hash argument from FetchBlock
Sjors Dec 8, 2021
bc17d4e
rpc: clarify getblockfrompeer behavior when called multiple times
Sjors Dec 8, 2021
135d43b
rpc: turn already downloaded into error in getblockfrompeer
Sjors Dec 13, 2021
5cb55ec
rpc: more detailed errors for getblockfrompeer
Sjors Dec 8, 2021
024b9a7
rpc: use peer_id, block_hash for FetchBlock
Sjors Dec 10, 2021
65976a7
Remove/inline ReadRawBlockFromDisk(block_data, pindex, message_start)
hebasto Dec 21, 2021
91a77d8
p2p: Serialize cmpctblock at most once in NewPoWValidBlock
Jan 26, 2022
b49cd94
Respond to getheaders if we have sufficient chainwork
sdaftuar Jan 26, 2022
f17aed0
refactor: Release cs_main before MaybeSendFeefilter
Feb 23, 2022
a89bfb9
[net] Add CNode.m_relays_txs and CNode.m_bloom_filter_loaded
jnewbery Jan 27, 2021
1765752
[net processing] Move m_wtxid_relay to Peer
jnewbery Jan 27, 2021
70d3765
refactor: use Span in random.*
PastaPastaPasta Jan 31, 2022
65b8733
Add CSerializedNetMsg::Copy() helper
Mar 24, 2022
73dfcdc
p2p: Serialize cmpctblock at most once in NewPoWValidBlock
Jan 26, 2022
0f0792d
Add CSerializedNetMsg::Copy() helper
Mar 24, 2022
16a9974
tests: Add missing assert_equal import to p2p_add_connections.py
achow101 Dec 14, 2021
74edb8a
test: MiniWallet: add `send_self_transfer_chain` to create chain of txns
kouloumos Jun 28, 2022
c7de4f7
test: use MiniWallet to simplify mempool_package_limits.py tests
kouloumos Jun 15, 2022
5b5a8cb
test: rpc_getblockfrompeer: Use BGLTestFramework.
Jun 14, 2023
0014534
[functional test] submitrawpackage RPC
glozow Jul 20, 2021
9ea4b9a
test: refactor `RPCPackagesTest` to use `MiniWallet`
w0xlt Sep 2, 2022
c01999a
test, refactor: abstract the feature_nulldummy blockheight values
jonatack Mar 5, 2021
6236297
test: use 327 fewer blocks in feature_nulldummy
jonatack Mar 6, 2021
18b6b09
test: Fix intermittent failure in feature_segwit
DrahtBot Mar 16, 2022
488fb9a
test_runner.py: Do not execute feature_segwit and feature_nulldummy by
Jun 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ what is the goal of the pull request
Pull requests without a rationale and clear improvement may be closed
immediately.

GUI-related pull requests should be opened against
https://github.com/BGL-core/gui
first. See CONTRIBUTING.md
-->

### Notes
implementation details, hints for reviewers

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ Rebased-From: <commit hash of the original commit>
```

Have a look at [an example backport PR](
https://github.com/BGL/BGL/pull/16189).
https://github.com/bitcoin/bitcoin/pull/16189).

Also see the [backport.py script](
https://github.com/BGL-core/BGL-maintainer-tools#backport).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Features:
* Optional module for ECDH key exchange.
* Optional module for Schnorr signatures according to [BIP-340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki) (experimental).

<b>Bitgesell is a fork of BGL with the following changes:</b> <br>
<b>Bitgesell is a fork of Bitcoin with the following changes:</b> <br>
* Block Reward [Burn rate is 90% of tx fees]
```sh
nFees*0.1 + GetBlockSubsidy()
Expand Down
16 changes: 8 additions & 8 deletions build_msvc/BGL_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
#define BGL_BGL_CONFIG_H

/* Version Build */
#define CLIENT_VERSION_BUILD 6
#define CLIENT_VERSION_BUILD 0

/* Version is release */
#define CLIENT_VERSION_IS_RELEASE true

/* Major version */
#define CLIENT_VERSION_MAJOR 22
#define CLIENT_VERSION_MAJOR 1

/* Minor version */
#define CLIENT_VERSION_MINOR 1
#define CLIENT_VERSION_MINOR 8

/* Copyright holder(s) before %s replacement */
#define COPYRIGHT_HOLDERS "The %s developers"
Expand All @@ -27,7 +27,7 @@
#define COPYRIGHT_HOLDERS_SUBSTITUTION "BGL Core"

/* Copyright year */
#define COPYRIGHT_YEAR 2021
#define COPYRIGHT_YEAR 2022

/* Define to 1 to enable wallet functions */
#define ENABLE_WALLET 1
Expand Down Expand Up @@ -174,19 +174,19 @@
#define HAVE_SYS_TYPES_H 1

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "https://github.com/BGL/BGL/issues"
#define PACKAGE_BUGREPORT "https://github.com/BitgesellOfficial/bitgesell/issues"

/* Define to the full name of this package. */
#define PACKAGE_NAME "BGL Core"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "BGL Core 22.99.0"
#define PACKAGE_STRING "BGL Core 0.1.8"

/* Define to the home page for this package. */
#define PACKAGE_URL "https://BGLcore.org/"
#define PACKAGE_URL "https://bitgesell.ca/"

/* Define to the version of this package. */
#define PACKAGE_VERSION "22.99.0"
#define PACKAGE_VERSION "0.1.8"

/* Define this symbol if the minimal qt platform exists */
#define QT_QPA_PLATFORM_MINIMAL 1
Expand Down
2 changes: 2 additions & 0 deletions build_msvc/libBGL_qt/libBGL_qt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<ClCompile Include="..\..\src\qt\overviewpage.cpp" />
<ClCompile Include="..\..\src\qt\paymentserver.cpp" />
<ClCompile Include="..\..\src\qt\peertablemodel.cpp" />
<ClCompile Include="..\..\src\qt\peertablesortproxy.cpp" />
<ClCompile Include="..\..\src\qt\platformstyle.cpp" />
<ClCompile Include="..\..\src\qt\psbtoperationsdialog.cpp" />
<ClCompile Include="..\..\src\qt\qrimagewidget.cpp" />
Expand Down Expand Up @@ -89,6 +90,7 @@
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_overviewpage.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_paymentserver.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_peertablemodel.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_peertablesortproxy.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_platformstyle.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_psbtoperationsdialog.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_qrimagewidget.cpp" />
Expand Down
45 changes: 23 additions & 22 deletions build_msvc/libsecp256k1/libsecp256k1.vcxproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\common.init.vcxproj" />
<PropertyGroup Label="Globals">
<ProjectGuid>{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\secp256k1\src\secp256k1.c" />
</ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\secp256k1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\common.vcxproj" />
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\common.init.vcxproj" />
<PropertyGroup Label="Globals">
<ProjectGuid>{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\secp256k1\src\secp256k1.c" />
</ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;ENABLE_MODULE_EXTRAKEYS;ENABLE_MODULE_SCHNORRSIG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\secp256k1;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4146;4244;4267;4334</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="..\common.vcxproj" />
</Project>
12 changes: 6 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 22)
define(_CLIENT_VERSION_MINOR, 99)
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 8)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2021)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2022)
define(_COPYRIGHT_HOLDERS,[The %s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
AC_INIT([BGL Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[BGL Core]])
AC_INIT([BGL Core],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_BUILD)m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/BitgesellOfficial/bitgesell/issues],[BGL],[https://bitgesell.ca/])
AC_CONFIG_SRCDIR([src/validation.cpp])
AC_CONFIG_HEADERS([src/config/BGL-config.h])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down
10 changes: 4 additions & 6 deletions contrib/devtools/copyright_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,13 @@ def get_most_recent_git_change_year(filename):
################################################################################

def read_file_lines(filename):
f = open(filename, 'r', encoding="utf8")
file_lines = f.readlines()
f.close()
with open(filename, 'r', encoding="utf8") as f:
file_lines = f.readlines()
return file_lines

def write_file_lines(filename, file_lines):
f = open(filename, 'w', encoding="utf8")
f.write(''.join(file_lines))
f.close()
with open(filename, 'w', encoding="utf8") as f:
f.write(''.join(file_lines))

################################################################################
# update header years execution
Expand Down
112 changes: 51 additions & 61 deletions contrib/linearize/linearize-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,57 +11,22 @@
import re
import os
import os.path
import sha3
import sys
import hashlib
import datetime
import time
import glob
from collections import namedtuple

settings = {}

def hex_switchEndian(s):
""" Switches the endianness of a hex string (in pairs of hex chars) """
pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
return b''.join(pairList[::-1]).decode()

def uint32(x):
return x & 0xffffffff

def bytereverse(x):
return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
(((x) >> 8) & 0x0000ff00) | ((x) >> 24) ))

def bufreverse(in_buf):
out_words = []
for i in range(0, len(in_buf), 4):
word = struct.unpack('@I', in_buf[i:i+4])[0]
out_words.append(struct.pack('@I', bytereverse(word)))
return b''.join(out_words)

def wordreverse(in_buf):
out_words = []
for i in range(0, len(in_buf), 4):
out_words.append(in_buf[i:i+4])
out_words.reverse()
return b''.join(out_words)

def calc_hdr_hash(blk_hdr):
hash1 = hashlib.sha256()
hash1.update(blk_hdr)
hash1_o = hash1.digest()

hash2 = hashlib.sha256()
hash2.update(hash1_o)
hash2_o = hash2.digest()

return hash2_o
settings = {}

def calc_hash_str(blk_hdr):
hash = calc_hdr_hash(blk_hdr)
hash = bufreverse(hash)
hash = wordreverse(hash)
hash_str = hash.hex()
return hash_str
blk_hdr_hash = sha3.keccak_256()
blk_hdr_hash.update(blk_hdr)
return blk_hdr_hash.digest()[::-1].hex()

def get_blk_dt(blk_hdr):
members = struct.unpack("<I", blk_hdr[68:68+4])
Expand All @@ -73,12 +38,12 @@ def get_blk_dt(blk_hdr):
# When getting the list of block hashes, undo any byte reversals.
def get_block_hashes(settings):
blkindex = []
f = open(settings['hashlist'], "r", encoding="utf8")
for line in f:
line = line.rstrip()
if settings['rev_hash_bytes'] == 'true':
line = hex_switchEndian(line)
blkindex.append(line)
with open(settings['hashlist'], "r", encoding="utf8") as f:
for line in f:
line = line.rstrip()
if settings['rev_hash_bytes'] == 'true':
line = bytes.fromhex(line)[::-1].hex()
blkindex.append(line)

print("Read " + str(len(blkindex)) + " hashes")

Expand All @@ -91,6 +56,30 @@ def mkblockmap(blkindex):
blkmap[hash] = height
return blkmap

# This gets the first block file ID that exists from the input block
# file directory.
def getFirstBlockFileId(block_dir_path):
# First, this sets up a pattern to search for block files, for
# example 'blkNNNNN.dat'.
blkFilePattern = os.path.join(block_dir_path, "blk[0-9][0-9][0-9][0-9][0-9].dat")

# This search is done with glob
blkFnList = glob.glob(blkFilePattern)

if len(blkFnList) == 0:
print("blocks not pruned - starting at 0")
return 0
# We then get the lexicographic minimum, which should be the first
# block file name.
firstBlkFilePath = min(blkFnList)
firstBlkFn = os.path.basename(firstBlkFilePath)

# now, the string should be ['b','l','k','N','N','N','N','N','.','d','a','t']
# So get the ID by choosing: 3 4 5 6 7
# The ID is not necessarily 0 if this is a pruned node.
blkId = int(firstBlkFn[3:8])
return blkId

# Block header and extent on disk
BlockExtent = namedtuple('BlockExtent', ['fn', 'offset', 'inhdr', 'blkhdr', 'size'])

Expand All @@ -100,7 +89,9 @@ def __init__(self, settings, blkindex, blkmap):
self.blkindex = blkindex
self.blkmap = blkmap

self.inFn = 0
# Get first occurring block file id - for pruned nodes this
# will not necessarily be 0
self.inFn = getFirstBlockFileId(self.settings['input'])
self.inF = None
self.outFn = 0
self.outsz = 0
Expand Down Expand Up @@ -262,19 +253,18 @@ def run(self):
print("Usage: linearize-data.py CONFIG-FILE")
sys.exit(1)

f = open(sys.argv[1], encoding="utf8")
for line in f:
# skip comment lines
m = re.search(r'^\s*#', line)
if m:
continue

# parse key=value lines
m = re.search(r'^(\w+)\s*=\s*(\S.*)$', line)
if m is None:
continue
settings[m.group(1)] = m.group(2)
f.close()
with open(sys.argv[1], encoding="utf8") as f:
for line in f:
# skip comment lines
m = re.search(r'^\s*#', line)
if m:
continue

# parse key=value lines
m = re.search(r'^(\w+)\s*=\s*(\S.*)$', line)
if m is None:
continue
settings[m.group(1)] = m.group(2)

# Force hash byte format setting to be lowercase to make comparisons easier.
# Also place upfront in case any settings need to know about it.
Expand Down
32 changes: 13 additions & 19 deletions contrib/linearize/linearize-hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@

settings = {}

def hex_switchEndian(s):
""" Switches the endianness of a hex string (in pairs of hex chars) """
pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
return b''.join(pairList[::-1]).decode()

class BGLRPC:
def __init__(self, host, port, username, password):
authpair = "%s:%s" % (username, password)
Expand Down Expand Up @@ -85,7 +80,7 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
sys.exit(1)
assert(resp_obj['id'] == x) # assume replies are in-sequence
if settings['rev_hash_bytes'] == 'true':
resp_obj['result'] = hex_switchEndian(resp_obj['result'])
resp_obj['result'] = bytes.fromhex(resp_obj['result'])[::-1].hex()
print(resp_obj['result'])

height += num_blocks
Expand All @@ -103,19 +98,18 @@ def get_rpc_cookie():
print("Usage: linearize-hashes.py CONFIG-FILE")
sys.exit(1)

f = open(sys.argv[1], encoding="utf8")
for line in f:
# skip comment lines
m = re.search(r'^\s*#', line)
if m:
continue

# parse key=value lines
m = re.search(r'^(\w+)\s*=\s*(\S.*)$', line)
if m is None:
continue
settings[m.group(1)] = m.group(2)
f.close()
with open(sys.argv[1], encoding="utf8") as f:
for line in f:
# skip comment lines
m = re.search(r'^\s*#', line)
if m:
continue

# parse key=value lines
m = re.search(r'^(\w+)\s*=\s*(\S.*)$', line)
if m is None:
continue
settings[m.group(1)] = m.group(2)

if 'host' not in settings:
settings['host'] = '127.0.0.1'
Expand Down
Loading