Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
754 commits
Select commit Hold shift + click to select a range
7b8ede4
Merge pull request #134 from AppLayerLabs/deps_rev
itamarcps Nov 14, 2024
a9cd757
Doxygen: fix most warnings & missing docs
Jean-Lessa Nov 14, 2024
81c736c
DB: fix small typo
Jean-Lessa Nov 15, 2024
23f8139
Update README.md
Jean-Lessa Nov 15, 2024
fb855e0
SimpleContract: fix minor details to fit with docs
Jean-Lessa Nov 15, 2024
fb7a23c
ERC20Wrapper: same as previous commit
Jean-Lessa Nov 15, 2024
d61e5de
Move bytesToString/stringToBytes to StrConv
Jean-Lessa Nov 16, 2024
a930008
Cleanup stale TODOs
Jean-Lessa Nov 16, 2024
8dbd22f
Add sonar-scanner path
lambdart Nov 18, 2024
0e60ff4
Merge pull request #136 from AppLayerLabs/fix/sonar-scanner
itamarcps Nov 18, 2024
8ef67ce
Doxygen: fix remaining warnings
Jean-Lessa Nov 18, 2024
86606b8
Fix compile errors
Jean-Lessa Nov 18, 2024
8eb3beb
Add cleanext to deps.sh and enable LZ4 for DB
Jean-Lessa Nov 28, 2024
c249fa9
Fix consensus adding transactions from same sender on single block
itamarcps Dec 4, 2024
305fffb
Update db.h
itamarcps Dec 4, 2024
d20c65f
Move transaction pulling to another thread instead of Consensus
itamarcps Dec 5, 2024
254af00
Revert "Move transaction pulling to another thread instead of Consensus"
itamarcps Dec 5, 2024
f344a77
Reapply "Move transaction pulling to another thread instead of Consen…
itamarcps Dec 5, 2024
9d9eb45
Add a Syncer to the tx puller
itamarcps Dec 5, 2024
cca68e9
Increase timeout
itamarcps Dec 5, 2024
12d370c
Update consensus.cpp
itamarcps Dec 6, 2024
3b648ac
Change timeout even further
itamarcps Dec 6, 2024
12a49d3
Fix orphaned thread on Consesus::pullerLoop()
itamarcps Dec 6, 2024
5fb45b6
Fix benchmark incorrect performance
itamarcps Dec 10, 2024
f02dd8a
Add tests for jsonrpc::Error
Jean-Lessa Dec 11, 2024
90517c6
Temp disable rdPoS tests because of Github Actions
Jean-Lessa Dec 13, 2024
01f5ae0
Temp disable State tests because of Github Actions
Jean-Lessa Dec 13, 2024
78e6337
Temp disable P2P tests because of Github actions
Jean-Lessa Dec 13, 2024
967b04c
Fix hanging thread on consensus
itamarcps Dec 13, 2024
fffb034
Fix P2P writting to nodes that are not handshaken
itamarcps Dec 13, 2024
1d9e38a
Fix timeout on State tests
itamarcps Dec 13, 2024
a63ba77
Merge branch 'development' into coverage
Jean-Lessa Dec 13, 2024
320c14c
Reenable failing tests after merged fix
Jean-Lessa Dec 13, 2024
d66887c
Revise test coverage for some units (contract + utils)
Jean-Lessa Dec 17, 2024
8b24d42
a lot of things, a lot
Pedrozo Dec 18, 2024
cb5db3e
Accept non-latest block numbers on RPC
itamarcps Dec 19, 2024
5db0c19
Accept non-latest block on multiple RPC endpoints
itamarcps Dec 19, 2024
4c50bcf
cursed bug fixed
Pedrozo Dec 19, 2024
af87fe3
more bugs fixed
Pedrozo Dec 19, 2024
6e7be55
Net: limit the number of requests tracked by keeping only a minimum
fcecin Dec 20, 2024
44f805f
Fixes
fcecin Dec 20, 2024
fec35ba
Merge pull request #143 from AppLayerLabs/gcrequests
fcecin Dec 20, 2024
499c897
Revise test coverage for some more units (everywhere)
Jean-Lessa Dec 20, 2024
ae2be6f
call tracer unfinished (not compilable)
Pedrozo Dec 21, 2024
a5aa391
Revise test coverage for yet some more units (contract + utils)
Jean-Lessa Dec 26, 2024
ac38c4d
Fix DEXV2Pair test failure
Jean-Lessa Dec 26, 2024
fab7fef
Fix DEXV2Pair test failure part 2
Jean-Lessa Dec 26, 2024
1a889f9
Fix DEXV2Pair test failure part 3 & Knuckles
Jean-Lessa Dec 26, 2024
de6d72a
call tracer tests fixed
Pedrozo Dec 26, 2024
ddaff63
call tracer decoupled
Pedrozo Dec 26, 2024
8f27248
Fix (u)intXToBytes dirty return value
Jean-Lessa Dec 26, 2024
5374aaf
Update gcovr on workflow dockerfile
Jean-Lessa Dec 26, 2024
8f3258b
Force Docker to use Bash
Jean-Lessa Dec 26, 2024
57dba72
Get gcovr binary from upstream instead of pip
Jean-Lessa Dec 26, 2024
125270b
Add wget to bdk_cpp.dockerfile
Jean-Lessa Dec 26, 2024
3a5a346
Return to pip but force it, also downgrade gcovr
Jean-Lessa Dec 27, 2024
6fcc609
Fix gcovr usage on actions workflow
Jean-Lessa Dec 27, 2024
d31d3f6
Merge branch 'development' into coverage
Jean-Lessa Dec 27, 2024
a6e3ce8
call tracer UB fixed
Pedrozo Dec 27, 2024
0c1a150
Merge pull request #141 from AppLayerLabs/coverage
Jean-Lessa Dec 28, 2024
9abf98f
Add tests for ReentrancyGuard
Jean-Lessa Jan 6, 2025
b7295e9
Force gcovr to exclude throw branches for better coverage
Jean-Lessa Jan 6, 2025
0fba68b
precompiled contract added and errors fixed
Pedrozo Jan 6, 2025
ecc20f4
many improvements and fixes related to gas
Pedrozo Jan 8, 2025
8e0406e
Revise condition coverage for some units (everywhere)
Jean-Lessa Jan 8, 2025
f823be8
native wrapper tests fixed
Pedrozo Jan 9, 2025
4c9fdde
Add events to ERC20 and ERC721
itamarcps Jan 9, 2025
a07c817
Increase gas estimation values by 15%
itamarcps Jan 9, 2025
2b56f8f
Fix ERC20 ABI tests
itamarcps Jan 9, 2025
4e5a550
Revise condition coverage for some more units (everywhere)
Jean-Lessa Jan 11, 2025
d5b7e4a
Fix conflict with development branch in ERC20 tests
Jean-Lessa Jan 11, 2025
e64579f
Fix some gas tests failing due to not being aware of a07c817
Jean-Lessa Jan 11, 2025
c59eb6d
Revise condition coverage for yet some more units (contract + utils)
Jean-Lessa Jan 12, 2025
79b4f6b
fixed accounts behavior when not previously populated, and added prop…
Pedrozo Jan 13, 2025
65de3a6
Fix tests on gas estimation
itamarcps Jan 13, 2025
155fed9
added missing checkpoint commit
Pedrozo Jan 13, 2025
cac0ba8
message dispatcher reorganized
Pedrozo Jan 13, 2025
ce70541
out of gas error fixed
Pedrozo Jan 14, 2025
511371b
simplified call tracer
Pedrozo Jan 14, 2025
054306d
tx additional data added back
Pedrozo Jan 14, 2025
030c9e8
Merge pull request #146 from AppLayerLabs/coverage
Jean-Lessa Jan 15, 2025
6492dfc
merging development (not compiling)
Pedrozo Jan 15, 2025
7acb70b
deps.sh: fix some deps not being installed on Docker
Jean-Lessa Jan 15, 2025
8b93a03
fixing merging errors
Pedrozo Jan 15, 2025
3e1c265
removing unused files
Pedrozo Jan 15, 2025
929debd
small style and warnings adjustments
Pedrozo Jan 15, 2025
78a3c4c
fixing failing unit test
Pedrozo Jan 15, 2025
6d3b86d
removed unused stuff
Pedrozo Jan 15, 2025
bdf354c
messages directory removed
Pedrozo Jan 15, 2025
88cbb72
fixed include names
Pedrozo Jan 15, 2025
075aa72
removed unused file
Pedrozo Jan 15, 2025
0a4abbd
added missing include on bytes.h
Pedrozo Jan 16, 2025
da24d43
implementing pull request review comments
Pedrozo Jan 16, 2025
2d226a8
fixing error messages, implementing uint256_t parsing, and fixing UB …
Pedrozo Jan 20, 2025
d8b68dd
15% increase in gas estimation workaround
Pedrozo Jan 20, 2025
8ec5a19
Merge pull request #148 from AppLayerLabs/feature/contract-host-refac…
Pedrozo Jan 20, 2025
5eb6511
fixing double nonce increment on contract creation transactions
Pedrozo Jan 21, 2025
0c8a2cb
removing 15% workaround, and adding events only when tracing is enabled
Pedrozo Jan 22, 2025
09cc18e
Fix benchmarks
itamarcps Jan 23, 2025
5ceeb52
minor changes for readability
Pedrozo Jan 23, 2025
357b7c0
preventing unexpected behaviors by reverting the whole contract if an…
Pedrozo Jan 27, 2025
ab4b329
ecrecover precompile added
Pedrozo Jan 29, 2025
f9dffc4
Update dynamicexception.h
itamarcps Jan 29, 2025
fe24e56
Update faucetmanager.h
itamarcps Jan 29, 2025
1fb813b
sha256 precompile implemented
Pedrozo Jan 29, 2025
762b588
bytes1...bytes32 added with proper abi encoding/decoding, and ripemd1…
Pedrozo Jan 30, 2025
48834c6
identity precompile added
Pedrozo Jan 31, 2025
40fa12c
Add transaction reindexing for RPC_TRACE
itamarcps Jan 31, 2025
a3b1fda
Remove debug condition
itamarcps Jan 31, 2025
8cd218e
blake2f precompile added
Pedrozo Feb 2, 2025
9466549
sonarqube requirements
Pedrozo Feb 3, 2025
fc98d7d
Update methods.cpp
itamarcps Feb 3, 2025
fe1fc32
Add orderbook contract
lambdart Nov 18, 2024
69e6a11
Add orderbook tests
lambdart Nov 18, 2024
d399afd
Add safe multiset wrapper
lambdart Nov 18, 2024
7a27b77
Add orderbook files to be compiled
lambdart Nov 18, 2024
964a9fe
Add check method
lambdart Nov 18, 2024
fe40ef8
Add OrderBook contract type
lambdart Nov 18, 2024
dd50792
Add exp10 template function
lambdart Nov 18, 2024
c56df6c
Add orderbook test to be compiled
lambdart Nov 18, 2024
3fc744d
Add market orders
lambdart Nov 29, 2024
3bfab28
Add more tests
lambdart Dec 11, 2024
28c1c66
Add delete bid limit order test
lambdart Dec 13, 2024
95d1641
Remove const type qualifier (temporary)
lambdart Dec 13, 2024
2a2ec3d
Add build no cache action
lambdart Dec 13, 2024
b341be5
Add initialize list (this)
lambdart Dec 18, 2024
dec652f
Add simple tests
lambdart Dec 18, 2024
545cd7b
Fix memory leaks
lambdart Dec 19, 2024
55b441d
Add 'delete ask limit order' test
lambdart Dec 19, 2024
82c0ead
Modify market order parameters
lambdart Jan 21, 2025
5902828
Add test for market orders
lambdart Jan 21, 2025
15985f5
Add evaluation of market orders methods (bid and ask)
lambdart Jan 31, 2025
3977748
Add tests to market orders
lambdart Jan 31, 2025
2a450c4
Simplify the evaluation of ask market order
lambdart Feb 4, 2025
61a945a
Delete evaluateMarketAskOrder signature
lambdart Feb 4, 2025
bf2b767
Remove print debug information
lambdart Feb 5, 2025
a9845a4
Fix typo
lambdart Feb 5, 2025
b051573
Add registered false to commit and revert operations
lambdart Feb 5, 2025
9e3a31f
Remove duplicate parameter (doxygen)
lambdart Feb 5, 2025
f8bbeda
Add constructor names to the registerContract method
lambdart Feb 5, 2025
eaa2606
Update sonar scanner environment path
lambdart Feb 6, 2025
9abc87b
modexp added, organized precompiles better, and a lot of unit tests f…
Pedrozo Feb 7, 2025
49bcf8b
Make the network rely on only one node as multiple validators
itamarcps Feb 7, 2025
e491a7f
Add State dumping through RPC
itamarcps Feb 10, 2025
b61681b
Add few debugging symbols
itamarcps Feb 11, 2025
a077c55
Update nodeconns.cpp
itamarcps Feb 11, 2025
24c9d84
Add more debugging symbols
itamarcps Feb 11, 2025
1569a59
Fix DB Has function
itamarcps Feb 11, 2025
bd65683
Fix dumping to DB
itamarcps Feb 14, 2025
70b24d5
Update contracthost.cpp
itamarcps Feb 14, 2025
3def43f
Fix contract address derivation
itamarcps Feb 17, 2025
1e2d055
self-call observers
Pedrozo Feb 19, 2025
6b4c997
Implement basis of Build The Void
itamarcps Feb 19, 2025
afd2eaf
Update erc20.cpp
itamarcps Feb 19, 2025
1721f03
Merge branch 'development' into testnet-0.2
Pedrozo Feb 20, 2025
ffb23c7
Fix BTV memory leak
itamarcps Feb 20, 2025
52a0f33
Fix remaining [contract] tests
itamarcps Feb 20, 2025
0eba9b1
contract address generation fixed, and self-call small adjusts
Pedrozo Feb 20, 2025
3475c33
changing observer caller to be itself
Pedrozo Feb 20, 2025
ed0e882
add support for arrays in the ABI
itamarcps Feb 20, 2025
236ca8d
Implement BTV Game Prototype
itamarcps Feb 21, 2025
4cb1492
fix chunk loading from db
itamarcps Feb 21, 2025
ab050c0
Implement getPlayerTokens to BTVPlayer
itamarcps Feb 23, 2025
048a582
Apply workaround in ContractManager view function
itamarcps Feb 23, 2025
d925669
Add temporary fix for ContractManager
itamarcps Feb 23, 2025
b779ad4
BTV Development and Observer fixes
itamarcps Feb 24, 2025
841ec48
Fix errors related to observer
itamarcps Feb 24, 2025
6e3dc78
Add .forRPC() on eth_call method
itamarcps Feb 24, 2025
c0518cd
Add strict ruling
itamarcps Feb 24, 2025
80eb37e
Update hex.cpp
itamarcps Feb 24, 2025
c65f92b
Remove .forRPC() from eth_call
itamarcps Feb 24, 2025
cdb91f5
fixing issue with contracts' receive() functions
Pedrozo Feb 25, 2025
7e9e871
coming back with the 15% workaround
Pedrozo Feb 25, 2025
ee323db
Add BuildTheVoid::getPlayerStatus
itamarcps Feb 25, 2025
e15afe5
Add proper try/catch on eth_estimateGas
itamarcps Feb 26, 2025
c85e510
block observers modified to be registered in constructors
Pedrozo Feb 26, 2025
5f817df
adding sand token case in unit tests
Pedrozo Feb 26, 2025
6ce96c2
static calls corrected
Pedrozo Feb 27, 2025
7bbdad3
Fix DB::getKeys not getting endSlice
itamarcps Feb 27, 2025
e6a0b4a
Fix Storage::getEvents properly returning all events
itamarcps Feb 27, 2025
820f481
Add debugging to energy block creation
itamarcps Feb 28, 2025
163b3c8
Fix ContractGlobals ordering when constructing State
itamarcps Feb 28, 2025
6e275f0
Update state.cpp
itamarcps Feb 28, 2025
e15df77
Fix BlockObserver call on constructor
itamarcps Feb 28, 2025
1ccc775
Fix Observers not being inserted into State when loading from DB
itamarcps Feb 28, 2025
38d614b
Implement ERC20Mintable
itamarcps Feb 28, 2025
b2b922d
Fix eth_getCode
itamarcps Mar 4, 2025
34acf25
Revert "Fix eth_getCode"
itamarcps Mar 4, 2025
7aa5af6
Add ContractManager::getContractInfo
itamarcps Mar 4, 2025
ff6d371
Reapply "Fix eth_getCode"
itamarcps Mar 4, 2025
668c57b
Make eth_getCode return the name of precompile contracts instead of n…
itamarcps Mar 4, 2025
caa31a7
Fix jsonrpc::parseArrayIfExists
itamarcps Mar 4, 2025
0b7f12e
Fix ERC20Mintable::dump() for testnet
itamarcps Mar 4, 2025
0327faf
Fix wrong conditional on Ownable::Ownable
itamarcps Mar 4, 2025
c1a1a2d
Don't print debug message
itamarcps Mar 4, 2025
b1b01de
Make DB::getBatch create a new prefix with key instead of iterating w…
itamarcps Mar 5, 2025
8e059bb
Implement BTV Websocket prototype
itamarcps Mar 20, 2025
74df2ac
Uncomment world loading and make invalid requests drop the session
itamarcps Mar 20, 2025
05db247
Add missing event push_back
itamarcps Mar 20, 2025
e344d37
Fix mutex usage
itamarcps Mar 21, 2025
a06744c
Remove forced 5000 gas limit usage on EVM calls
itamarcps Mar 24, 2025
e2a5b64
Fix generateContractAddress derivation
itamarcps Apr 16, 2025
96115c3
Add proper ifdef condition in generateContractAddress
itamarcps Apr 16, 2025
a16dce4
eth_getLogs in SQL
Pedrozo Apr 16, 2025
2dc4ef8
Merge pull request #153 from AppLayerLabs/eth_getLogs
itamarcps Apr 18, 2025
4039f1e
Fix all Contract related tests
itamarcps Apr 18, 2025
316bce5
Replace OpenSSL RIPEMD160 by own implementation
itamarcps Apr 21, 2025
c052af5
Merge pull request #149 from AppLayerLabs/precompiles
itamarcps Apr 21, 2025
150d271
Merge pull request #154 from AppLayerLabs/development
itamarcps Apr 21, 2025
257f5d6
Merge branch 'testnet-0.2' into contract/orderbook
itamarcps Apr 22, 2025
3ac7463
Merge pull request #150 from AppLayerLabs/contract/orderbook
itamarcps Apr 22, 2025
99e59c1
Fix SafeMultiSet usage and revert logic
itamarcps Apr 22, 2025
ea9d57a
transactions for events insertions
Pedrozo Apr 22, 2025
524f28b
Improve Export/Import old to new EventsDB
itamarcps Apr 23, 2025
b6c1b92
Improve Orderbook C++ overall correctness
itamarcps Apr 23, 2025
89ac4fb
Fix EventsDB log getting for addresses
itamarcps Apr 23, 2025
eadeeab
Fix EventsDB RPC and DB Performance/Stability
itamarcps Apr 24, 2025
26665e2
Move standards contracts to own folder (ERC20, ERC721, etc)
itamarcps Apr 28, 2025
3613303
Sync ERC721 to OpenZeppelin v5.0.2
itamarcps Apr 28, 2025
a437d50
Make sure to decode chunks on BTVServer Manager
itamarcps Apr 30, 2025
687c17d
Implement ERC-165 to ERC20 and ERC721
itamarcps May 8, 2025
2f53979
Integrate ERC-165 to all other contracts
itamarcps May 8, 2025
0fd69e0
Improve contract ABI registration
itamarcps May 9, 2025
ff83ff6
Fix ContractABIGenerator tests
itamarcps May 9, 2025
72ed985
Update EVMOne to 0.15.0
itamarcps May 9, 2025
117b288
Upgrade EVM to Prague
itamarcps May 13, 2025
3a23c58
Update ERC20 EVM Bytecode to Prague
itamarcps May 13, 2025
9a3e6c9
Fix EVM -> CPP DELEGATECALL
itamarcps May 15, 2025
0ba820c
Add more tests for EVM <-> CPP calls
itamarcps May 17, 2025
971e4aa
Fix DelegateCall with value
itamarcps May 20, 2025
5c8829d
Add even more tests to EVM DelegateCall
itamarcps May 22, 2025
5e71577
Fix native DexV2 functions
itamarcps May 26, 2025
7223a31
Implement receive() and fallback() for C++ functions
itamarcps May 27, 2025
2ac1500
Refactor DynamicContract
itamarcps May 27, 2025
3319496
Enable tests for EVMOne
itamarcps Jun 9, 2025
6bc0961
Fix ERC20 EVM benchmark
itamarcps Jun 10, 2025
817370c
Implement eth_maxPriorityFeePerGas
itamarcps Jun 11, 2025
618dabb
Fix uint64_t parser for eth_feeHistory
itamarcps Jun 11, 2025
9b20f52
Properly answer EIP1559 Transaction information on RPC
itamarcps Jun 12, 2025
ba2ec09
Add further debugging information in message dispatcher
itamarcps Jun 18, 2025
5a334c6
Fix JSON RPC ternary with different return types
itamarcps Jun 18, 2025
9bb91df
Add extra debugging information for when EVM reverts
itamarcps Jun 18, 2025
ff84774
Fix JSONRPC tests
itamarcps Jun 18, 2025
0910445
Make ABI::Encoder::encodeError encode the entire string
itamarcps Jun 19, 2025
a36a6a3
Proper encode EVM errors for RPC
itamarcps Jun 23, 2025
3f7660b
Fix ExecutionContext while simulating
itamarcps Jul 7, 2025
94411d9
Update README
itamarcps Jul 7, 2025
cc33074
Properly revert the deepest error to RPC when simulating.
itamarcps Jul 8, 2025
43942c3
Fix VMExecutionError throw spacing
itamarcps Jul 8, 2025
d5bb166
Merge branch 'main' into testnet-0.2
itamarcps Jul 25, 2025
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc nano vim unison git gdb ninja-build

# Set the working directory in the Docker container
WORKDIR /orbitersdk-cpp
WORKDIR /bdk-cpp

# Copy Unison configuration file
COPY sync.prf /root/.unison/sync.prf
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "OrbiterSDK C++ Dev Container",
"name": "BDK C++ Dev Container",
"build": {
"dockerfile": "Dockerfile.dev"
},
Expand All @@ -8,11 +8,11 @@
"terminal.integrated.shell.linux": "/bin/bash"
},
"mounts": [
"source=${localWorkspaceFolder},target=/orbitersdk-cpp,type=bind,consistency=cached"
"source=${localWorkspaceFolder},target=/bdk-cpp,type=bind,consistency=cached"
],
"runArgs": ["-it", "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
"extensions": ["ms-vscode.cpptools", "ms-vscode.cmake-tools"],
"postCreateCommand": "mkdir /orbitersdk-data && nohup unison -repeat 1 /orbitersdk-cpp /orbitersdk-data -auto -batch \
"postCreateCommand": "mkdir /bdk-data && nohup unison -repeat 1 /bdk-cpp /bdk-data -auto -batch \
-ignore 'Name {build}' \
-ignore 'Name {build_local_testnet}' \
-ignore 'Name {.vscode}' \
Expand All @@ -38,5 +38,5 @@
-ignore 'Name {kateproject}' \
-ignore 'Name {*.o}' \
-ignore 'Name {*.gch}' \
> /dev/null 2>&1 && cp -r /orbitersdk-cpp/* /orbitersdk-data"
> /dev/null 2>&1 && cp -r /bdk-cpp/* /bdk-data"
}
4 changes: 2 additions & 2 deletions .devcontainer/sync.prf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unison synchronization profile
root = /orbitersdk-cpp
root = /orbitersdk-data
root = /bdk-cpp
root = /bdk-data

# Specify synchronization options
auto = true
Expand Down
7 changes: 5 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
build/
*.o
*.gch
proto/metrics.pb.cc
Expand All @@ -18,6 +17,7 @@ depends/x86_64-pc-linux-gnu/
scripts/AIO-setup.log
compile_commands.json
.cache/
.backup/

#IDEA's IDE
.idea/
Expand All @@ -27,6 +27,9 @@ cmake-build-release/
# Files generated by CMake
src/utils/options.h

# build directory
build/

# Files generated by automated scripts
local_testnet/
build_local_testnet/
build_local_testnet/
2 changes: 1 addition & 1 deletion .github/workflows/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-git
## Added to documentation?

- [ ] 📜 README.md
- [ ] 📓 [Sparq Docs](https://github.com/SparqNet/sparq-docs)
- [ ] 📓 [Sparq Docs](https://github.com/AppLayer/sparq-docs)
- [ ] 🙅 no documentation needed

## [optional] Are there any post-deployment tasks we need to perform?
Expand Down
129 changes: 51 additions & 78 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,96 +11,69 @@ on:
- development

jobs:
setup:
runs-on: ubuntu-latest

container:
image: debian:bookworm

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update apt-get
run: apt-get update

- name: Install project dependencies
run: DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc libprotobuf-dev git doxygen curl unzip

- name: Print GCC version
run: gcc --version

- name: Install CA certificates
run: apt-get install -y ca-certificates

build_test_and_analyse:
needs: setup
runs-on: ubuntu-latest

container:
image: debian:bookworm
runs-on: [self-hosted, linux, x64]
env:
# https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
# Directory where build-wrapper output will be placed
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
TARGET_DIR: "/home/actions/actions-runner/_work/bdk-cpp/bdk-cpp"
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update apt-get
run: apt-get update

- name: Install project dependencies
run: DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc libprotobuf-dev git curl unzip gcovr

- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2

- name: Configure CMake
run: cmake -S . -B build -DSONARQUBE_ANALYSIS=ON -DDEBUG=OFF

- name: Clone the repository
run: git clone https://github.com/${{github.repository}} ${{env.TARGET_DIR}} || true
- name: Sync with remote repository
run: git -C ${{env.TARGET_DIR}} fetch
- name: Checkout to current branch
run: git -C ${{env.TARGET_DIR}} checkout ${{env.BRANCH_NAME}}
- name: Set user.email
run: git -C ${{env.TARGET_DIR}} config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Set user.name
run: git -C ${{env.TARGET_DIR}} config --global user.name "github-actions"
- name: Update local repository
run: git -C ${{env.TARGET_DIR}} pull
- name: Build the container
run: ./scripts/auto.sh -s bdk build
- name: Stop the container
run: ./scripts/auto.sh -s bdk stop
- name: Restart the container
run: ./scripts/auto.sh -s bdk up
- name: Clean previous build (if there is one)
run: ./scripts/auto.sh -s bdk exec 'make -C build clean' || true
- name: Configure MOLD linker
run: ./scripts/auto.sh -s bdk exec 'cmake -S . -B build
-DSONARQUBE_ANALYSIS=ON -DDEBUG=OFF
-DCMAKE_EXE_LINKER_FLAGS=\"-fuse-ld=mold\"
-DCMAKE_SHARED_LINKER_FLAGS=\"-fuse-ld=mold\"'
- name: Build with SonarQube BuildWrapper + CMake
run: build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release -- -j $(nproc)

- name: Give execute permissions
run: chmod +x ./build/orbitersdkd-tests

- name: Run Catch2 Tests
run: ./build/orbitersdkd-tests -d yes

run: ./scripts/auto.sh -s bdk exec \
'build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }}
cmake --build build --config Release -- -j $(nproc)'
- name: Run Tests
run: ./scripts/auto.sh -s bdk exec \
'./build/src/bins/bdkd-tests/bdkd-tests -d yes'
- name: Delete coverage XML report (if any)
run: ./scripts/auto.sh -s bdk exec 'rm coverage.xml || true'
- name: Collect coverage into one XML report
run: |
gcovr --gcov-ignore-parse-errors --sonarqube > coverage.xml

run: ./scripts/auto.sh -s bdk exec \
'gcovr -d --gcov-ignore-parse-errors --exclude-throw-branches --sonarqube -o coverage.xml'
- name: Run SonarQube Scanner
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" --define sonar.coverageReportPaths=coverage.xml
run: ./scripts/auto.sh -s bdk exec \
'env SONAR_TOKEN=${{ env.SONAR_TOKEN }}
SONAR_HOST_URL=${{ env.SONAR_HOST_URL }}
sonar-scanner
--define sonar.cfamily.build-wrapper-output=${{ env.BUILD_WRAPPER_OUT_DIR }}
--define sonar.coverageReportPaths=coverage.xml'
documentation:
runs-on: [self-hosted, linux, x64]
needs: build_test_and_analyse
runs-on: ubuntu-latest

container:
image: debian:bookworm

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name : Update apt-get
run: apt-get update

- name : Install Doxygen
run: apt-get install -y doxygen

- name: Generate Doxygen Documentation
run: |
mkdir docs
doxygen Doxyfile

run: ./scripts/auto.sh -s bdk exec 'doxygen Doxyfile'
- name: Publish Documentation
uses: actions/upload-artifact@v4
with:
name: Documentation
path: docs
path: docs
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ compile_commands.json
cmake-build-debug/
cmake-build-release/

# emacs
TAGS
.dir-locals.el
.backup

# VILARINHO's ignored files
liner.sh
prepare-lib.sh
Expand All @@ -48,4 +53,5 @@ build_local_testnet/
# Files generated by Doxygen
docs/html/

# Documentation
sparq-docs
2 changes: 1 addition & 1 deletion .kateproject
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "orbitersdk",
"name": "bdk",
"files": [ { "git": 1 } ]
}
Loading
Loading