Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-jentzsch committed Jul 31, 2021
2 parents 70c5ead + ae27895 commit 694c135
Show file tree
Hide file tree
Showing 266 changed files with 8,646 additions and 4,641 deletions.
10 changes: 5 additions & 5 deletions c/ci-analyse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ coverage:

clangcheck:
stage: analysis
image: docker.slock.it/build-images/cmake:clang11
image: docker.slock.it/build-images/cmake:clang13
needs: []
extends: .only_full
allow_failure: false
Expand All @@ -37,8 +37,8 @@ clangcheck:
script:
- mkdir _build
- cd _build
- scan-build-11 cmake -DTAG_VERSION=$CI_COMMIT_TAG -DCMAKE_BUILD_TYPE=DEBUG -DIN3_SERVER=true ..
- scan-build-11 --status-bugs --exclude ../c/src/third-party --force-analyze-debug-code -o ../report make
- scan-build-13 cmake -DTAG_VERSION=$CI_COMMIT_TAG -DCMAKE_BUILD_TYPE=DEBUG -DIN3_SERVER=true ..
- scan-build-13 --status-bugs --exclude ../c/src/third-party --force-analyze-debug-code -o ../report make
artifacts:
paths:
- report
Expand Down Expand Up @@ -113,11 +113,11 @@ code_quality:
format:
stage: analysis
needs: []
image: docker.slock.it/build-images/cmake:clang11
image: docker.slock.it/build-images/cmake:clang13
tags:
- short-jobs
script:
- 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
- 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
- git diff --patch --exit-code

cpd:
Expand Down
4 changes: 2 additions & 2 deletions c/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ clang50:
- .conanbuild
- .only_full

clang11:
image: docker.slock.it/build-images/cmake:clang11
clang13:
image: docker.slock.it/build-images/cmake:clang13
extends:
- .conanbuild
- .only_full
Expand Down
4 changes: 2 additions & 2 deletions c/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ else(MSVC)
endif()
endif(MSVC)
if (WASM)
set (CMAKE_C_FLAGS "-Wall -funsigned-char -Wextra -std=c99 ")
set (CMAKE_CXX_FLAGS "-Wall -funsigned-char -Wextra -std=c99 -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
set (CMAKE_C_FLAGS "-Wall -funsigned-char -Wextra -std=c99 -Wno-unused-function")
set (CMAKE_CXX_FLAGS "-Wall -funsigned-char -Wextra -std=c99 -Wno-unused-function -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
if (CMAKE_BUILD_TYPE MATCHES Debug)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined,address -fsanitize-minimal-runtime")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined,address -fsanitize-minimal-runtime")
Expand Down
98 changes: 91 additions & 7 deletions c/docs/1_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ Default-Value: `-DASSERTIONS=OFF`
Default-Value: `-DBTC=ON`


#### BTC_PRE_BPI34

Enable BTC-Verfification for blocks before BIP34 was activated

Default-Value: `-DBTC_PRE_BPI34=ON`


#### BUILD_DOC

generates the documenation with doxygen.
Expand Down Expand Up @@ -68,11 +75,11 @@ Default-Value: `-DCODE_COVERAGE=OFF`
Default-Value: `-DCOLOR=ON`


#### DEV_NO_INTRN_PTR
#### CORE_API

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

Default-Value: `-DDEV_NO_INTRN_PTR=ON`
Default-Value: `-DCORE_API=ON`


#### ESP_IDF
Expand Down Expand Up @@ -184,7 +191,21 @@ Default-Value: `-DLOGGING=ON`

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

Default-Value: `-DMULTISIG=OFF`
Default-Value: `-DMULTISIG=ON`


#### NODESELECT_DEF

Enable default nodeselect implementation

Default-Value: `-DNODESELECT_DEF=ON`


#### NODESELECT_DEF_WL

Enable default nodeselect whitelist implementation

Default-Value: `-DNODESELECT_DEF_WL=ON`


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

pkg-config executable

Default-Value: `-DPKG_CONFIG_EXECUTABLE=/opt/local/bin/pkg-config`
Default-Value: `-DPKG_CONFIG_EXECUTABLE=/opt/homebrew/bin/pkg-config`


#### PK_SIGNER

Enable Signing with private keys

Default-Value: `-DPK_SIGNER=ON`


#### PLGN_CLIENT_DATA

Enable client-data plugin

Default-Value: `-DPLGN_CLIENT_DATA=OFF`


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


#### RECORDER

enable recording option for reproduce executions

Default-Value: `-DRECORDER=ON`


#### RPC_ONLY

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.

Default-Value: `-DRPC_ONLY=OFF`


#### SEGGER_RTT

Use the segger real time transfer terminal as the logging mechanism

Default-Value: `-DSEGGER_RTT=OFF`


#### SENTRY

Enable Sentry

Default-Value: `-DSENTRY=OFF`


#### SWIFT

swift API for swift bindings

Default-Value: `-DSWIFT=OFF`


#### TAG_VERSION

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


#### THREADSAFE

uses mutex to protect shared nodelist access

Default-Value: `-DTHREADSAFE=ON`


#### TRANSPORTS

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


#### USE_WINHTTP

if true the winhttp transport will be built (with a dependency to winhttp)

Default-Value: `-DUSE_WINHTTP=OFF`


#### WASM

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.
Expand Down Expand Up @@ -285,10 +362,17 @@ Default-Value: `-DWASM_EMMALLOC=ON`
Default-Value: `-DWASM_SYNC=OFF`


#### ZKCRYPTO_LIB

Path to the static zkcrypto-lib

Default-Value: `-DZKCRYPTO_LIB=OFF`


#### ZKSYNC

add RPC-functioin to handle zksync-payments
add RPC-function to handle zksync-payments

Default-Value: `-DZKSYNC=OFF`
Default-Value: `-DZKSYNC=ON`


4 changes: 2 additions & 2 deletions c/include/in3/api_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
* a 32 byte long integer used to store ethereum-numbers.
*
* use the as_long() or as_double() to convert this to a useable number.
*/
*/
typedef struct {
uint8_t data[32];
} uint256_t;
Expand Down Expand Up @@ -84,4 +84,4 @@ char* api_last_error();
}
#endif

#endif //IN3_API_UTILS_H
#endif // IN3_API_UTILS_H
16 changes: 8 additions & 8 deletions c/include/in3/btc_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,55 +120,55 @@ typedef struct btc_block_txids {
bytes32_t* tx; /**< array of transaction ids */
} btc_block_txids_t;

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

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

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

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

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

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

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

#endif //IN3_BTC_API_H
#endif // IN3_BTC_API_H
Loading

0 comments on commit 694c135

Please sign in to comment.