Skip to content

Commit 694c135

Browse files
Merge branch 'develop'
2 parents 70c5ead + ae27895 commit 694c135

File tree

266 files changed

+8646
-4641
lines changed

Some content is hidden

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

266 files changed

+8646
-4641
lines changed

Diff for: c/ci-analyse.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ coverage:
2828

2929
clangcheck:
3030
stage: analysis
31-
image: docker.slock.it/build-images/cmake:clang11
31+
image: docker.slock.it/build-images/cmake:clang13
3232
needs: []
3333
extends: .only_full
3434
allow_failure: false
@@ -37,8 +37,8 @@ clangcheck:
3737
script:
3838
- mkdir _build
3939
- cd _build
40-
- scan-build-11 cmake -DTAG_VERSION=$CI_COMMIT_TAG -DCMAKE_BUILD_TYPE=DEBUG -DIN3_SERVER=true ..
41-
- scan-build-11 --status-bugs --exclude ../c/src/third-party --force-analyze-debug-code -o ../report make
40+
- scan-build-13 cmake -DTAG_VERSION=$CI_COMMIT_TAG -DCMAKE_BUILD_TYPE=DEBUG -DIN3_SERVER=true ..
41+
- scan-build-13 --status-bugs --exclude ../c/src/third-party --force-analyze-debug-code -o ../report make
4242
artifacts:
4343
paths:
4444
- report
@@ -113,11 +113,11 @@ code_quality:
113113
format:
114114
stage: analysis
115115
needs: []
116-
image: docker.slock.it/build-images/cmake:clang11
116+
image: docker.slock.it/build-images/cmake:clang13
117117
tags:
118118
- short-jobs
119119
script:
120-
- find c/src/core/ c/src/cmd/ c/src/api/ c/src/verifier/ c/src/transport/ java \( -name "*.c" -o -name "*.h" -o -name "*.java" \) | xargs clang-format-11 -i
120+
- find c/src/core/ c/src/cmd/ c/src/api/ c/src/verifier/ c/src/transport/ java \( -name "*.c" -o -name "*.h" -o -name "*.java" \) | xargs clang-format-13 -i
121121
- git diff --patch --exit-code
122122

123123
cpd:

Diff for: c/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ clang50:
124124
- .conanbuild
125125
- .only_full
126126

127-
clang11:
128-
image: docker.slock.it/build-images/cmake:clang11
127+
clang13:
128+
image: docker.slock.it/build-images/cmake:clang13
129129
extends:
130130
- .conanbuild
131131
- .only_full

Diff for: c/compiler.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ else(MSVC)
1010
endif()
1111
endif(MSVC)
1212
if (WASM)
13-
set (CMAKE_C_FLAGS "-Wall -funsigned-char -Wextra -std=c99 ")
14-
set (CMAKE_CXX_FLAGS "-Wall -funsigned-char -Wextra -std=c99 -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
13+
set (CMAKE_C_FLAGS "-Wall -funsigned-char -Wextra -std=c99 -Wno-unused-function")
14+
set (CMAKE_CXX_FLAGS "-Wall -funsigned-char -Wextra -std=c99 -Wno-unused-function -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
1515
if (CMAKE_BUILD_TYPE MATCHES Debug)
1616
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined,address -fsanitize-minimal-runtime")
1717
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined,address -fsanitize-minimal-runtime")

Diff for: c/docs/1_install.md

+91-7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ Default-Value: `-DASSERTIONS=OFF`
4040
Default-Value: `-DBTC=ON`
4141

4242

43+
#### BTC_PRE_BPI34
44+
45+
Enable BTC-Verfification for blocks before BIP34 was activated
46+
47+
Default-Value: `-DBTC_PRE_BPI34=ON`
48+
49+
4350
#### BUILD_DOC
4451

4552
generates the documenation with doxygen.
@@ -68,11 +75,11 @@ Default-Value: `-DCODE_COVERAGE=OFF`
6875
Default-Value: `-DCOLOR=ON`
6976

7077

71-
#### DEV_NO_INTRN_PTR
78+
#### CORE_API
7279

73-
(*dev option*) if true the client will NOT include a void pointer (named internal) for use by devs)
80+
registers a chain independend rpc-methods util-functions
7481

75-
Default-Value: `-DDEV_NO_INTRN_PTR=ON`
82+
Default-Value: `-DCORE_API=ON`
7683

7784

7885
#### ESP_IDF
@@ -184,7 +191,21 @@ Default-Value: `-DLOGGING=ON`
184191

185192
add capapbility to sign with a multig. Currrently only gnosis safe is supported
186193

187-
Default-Value: `-DMULTISIG=OFF`
194+
Default-Value: `-DMULTISIG=ON`
195+
196+
197+
#### NODESELECT_DEF
198+
199+
Enable default nodeselect implementation
200+
201+
Default-Value: `-DNODESELECT_DEF=ON`
202+
203+
204+
#### NODESELECT_DEF_WL
205+
206+
Enable default nodeselect whitelist implementation
207+
208+
Default-Value: `-DNODESELECT_DEF_WL=ON`
188209

189210

190211
#### PAY_ETH
@@ -198,7 +219,21 @@ Default-Value: `-DPAY_ETH=OFF`
198219

199220
pkg-config executable
200221

201-
Default-Value: `-DPKG_CONFIG_EXECUTABLE=/opt/local/bin/pkg-config`
222+
Default-Value: `-DPKG_CONFIG_EXECUTABLE=/opt/homebrew/bin/pkg-config`
223+
224+
225+
#### PK_SIGNER
226+
227+
Enable Signing with private keys
228+
229+
Default-Value: `-DPK_SIGNER=ON`
230+
231+
232+
#### PLGN_CLIENT_DATA
233+
234+
Enable client-data plugin
235+
236+
Default-Value: `-DPLGN_CLIENT_DATA=OFF`
202237

203238

204239
#### POA
@@ -208,13 +243,41 @@ Default-Value: `-DPKG_CONFIG_EXECUTABLE=/opt/local/bin/pkg-config`
208243
Default-Value: `-DPOA=OFF`
209244

210245

246+
#### RECORDER
247+
248+
enable recording option for reproduce executions
249+
250+
Default-Value: `-DRECORDER=ON`
251+
252+
253+
#### RPC_ONLY
254+
255+
specifies a coma-seperqted list of rpc-methods which should be supported. all other rpc-methods will be removed reducing the size of executable a lot.
256+
257+
Default-Value: `-DRPC_ONLY=OFF`
258+
259+
211260
#### SEGGER_RTT
212261

213262
Use the segger real time transfer terminal as the logging mechanism
214263

215264
Default-Value: `-DSEGGER_RTT=OFF`
216265

217266

267+
#### SENTRY
268+
269+
Enable Sentry
270+
271+
Default-Value: `-DSENTRY=OFF`
272+
273+
274+
#### SWIFT
275+
276+
swift API for swift bindings
277+
278+
Default-Value: `-DSWIFT=OFF`
279+
280+
218281
#### TAG_VERSION
219282

220283
the tagged version, which should be used
@@ -229,6 +292,13 @@ Default-Value: `-DTAG_VERSION=OFF`
229292
Default-Value: `-DTEST=OFF`
230293

231294

295+
#### THREADSAFE
296+
297+
uses mutex to protect shared nodelist access
298+
299+
Default-Value: `-DTHREADSAFE=ON`
300+
301+
232302
#### TRANSPORTS
233303

234304
builds transports, which may require extra libraries.
@@ -257,6 +327,13 @@ Default-Value: `-DUSE_PRECOMPUTED_EC=ON`
257327
Default-Value: `-DUSE_SCRYPT=ON`
258328

259329

330+
#### USE_WINHTTP
331+
332+
if true the winhttp transport will be built (with a dependency to winhttp)
333+
334+
Default-Value: `-DUSE_WINHTTP=OFF`
335+
336+
260337
#### WASM
261338

262339
Includes the WASM-Build. In order to build it you need emscripten as toolchain. Usually you also want to turn off other builds in this case.
@@ -285,10 +362,17 @@ Default-Value: `-DWASM_EMMALLOC=ON`
285362
Default-Value: `-DWASM_SYNC=OFF`
286363

287364

365+
#### ZKCRYPTO_LIB
366+
367+
Path to the static zkcrypto-lib
368+
369+
Default-Value: `-DZKCRYPTO_LIB=OFF`
370+
371+
288372
#### ZKSYNC
289373

290-
add RPC-functioin to handle zksync-payments
374+
add RPC-function to handle zksync-payments
291375

292-
Default-Value: `-DZKSYNC=OFF`
376+
Default-Value: `-DZKSYNC=ON`
293377

294378

Diff for: c/include/in3/api_utils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extern "C" {
5050
* a 32 byte long integer used to store ethereum-numbers.
5151
*
5252
* use the as_long() or as_double() to convert this to a useable number.
53-
*/
53+
*/
5454
typedef struct {
5555
uint8_t data[32];
5656
} uint256_t;
@@ -84,4 +84,4 @@ char* api_last_error();
8484
}
8585
#endif
8686

87-
#endif //IN3_API_UTILS_H
87+
#endif // IN3_API_UTILS_H

Diff for: c/include/in3/btc_api.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -120,55 +120,55 @@ typedef struct btc_block_txids {
120120
bytes32_t* tx; /**< array of transaction ids */
121121
} btc_block_txids_t;
122122

123-
/**
123+
/**
124124
* gets the transaction as raw bytes or null if it does not exist.
125125
* You must free the result with b_free() after use!
126126
*/
127127
bytes_t* btc_get_transaction_bytes(in3_t* in3, /**< the in3-instance*/
128128
bytes32_t txid /**< the txid */
129129
);
130130

131-
/**
131+
/**
132132
* gets the transaction as struct or null if it does not exist.
133133
* You must free the result with free() after use!
134134
*/
135135
btc_transaction_t* btc_get_transaction(in3_t* in3, /**< the in3-instance*/
136136
bytes32_t txid /**< the txid */
137137
);
138138

139-
/**
139+
/**
140140
* gets the blockheader as struct or null if it does not exist.
141141
* You must free the result with free() after use!
142142
*/
143143
btc_blockheader_t* btc_get_blockheader(in3_t* in3, /**< the in3-instance*/
144144
bytes32_t blockhash /**< the block hash */
145145
);
146146

147-
/**
147+
/**
148148
* gets the blockheader as raw serialized data (80 bytes) or null if it does not exist.
149149
* You must free the result with b_free() after use!
150150
*/
151151
bytes_t* btc_get_blockheader_bytes(in3_t* in3, /**< the in3-instance*/
152152
bytes32_t blockhash /**< the block hash */
153153
);
154154

155-
/**
155+
/**
156156
* gets the block as struct including all transaction data or null if it does not exist.
157157
* You must free the result with free() after use!
158158
*/
159159
btc_block_txdata_t* btc_get_block_txdata(in3_t* in3, /**< the in3-instance*/
160160
bytes32_t blockhash /**< the block hash */
161161
);
162162

163-
/**
163+
/**
164164
* gets the block as struct including all transaction ids or null if it does not exist.
165165
* You must free the result with free() after use!
166166
*/
167167
btc_block_txids_t* btc_get_block_txids(in3_t* in3, /**< the in3-instance*/
168168
bytes32_t blockhash /**< the block hash */
169169
);
170170

171-
/**
171+
/**
172172
* gets the block as raw serialized block bytes including all transactions or null if it does not exist.
173173
* You must free the result with b_free() after use!
174174
*/
@@ -188,4 +188,4 @@ btc_block_txdata_t* btc_d_to_block_txdata(d_token_t* t); /** Deserializes a `btc
188188
}
189189
#endif
190190

191-
#endif //IN3_BTC_API_H
191+
#endif // IN3_BTC_API_H

0 commit comments

Comments
 (0)