Skip to content

Commit efdb51d

Browse files
committed
ci(macos): fuzz fixes
1 parent 5b5db77 commit efdb51d

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
# No need to run on the read-only mirror, unless it is a PR.
7777
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request'
7878

79-
timeout-minutes: 120
79+
# timeout-minutes: 120 # ELEMENTS
8080

8181
env:
8282
FILE_ENV: './ci/test/00_setup_env_mac_native.sh'

ci/test/00_setup_env_mac_native.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export NO_DEPENDS=1
1818
export OSX_SDK=""
1919
export CCACHE_MAXSIZE=400M
2020
export RUN_FUZZ_TESTS=true
21-
export FUZZ_TESTS_CONFIG="--exclude banman" # https://github.com/bitcoin/bitcoin/issues/27924
21+
export FUZZ_TESTS_CONFIG="--exclude banman,wallet_notifications,addrman_serdeser" # https://github.com/bitcoin/bitcoin/issues/27924 # ELEMENTS

ci/test/06_script_b.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]
6767
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
6868
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
6969
mkdir -p "$DIR_UNIT_TEST_DATA"
70-
${CI_RETRY_EXE} curl --location --fail https://github.com/ElementsProject/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
70+
${CI_RETRY_EXE} curl --location --fail https://github.com/ElementsProject/qa-assets/raw/master/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
7171
fi
7272
fi
7373

src/rpc/output_script.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ static RPCHelpMan validateaddress()
7272
CTxDestination parent_dest = DecodeParentDestination(request.params[0].get_str(), error_msg_parent);
7373
const bool isValid = IsValidDestination(dest);
7474
const bool is_valid_parent = IsValidDestination(parent_dest);
75-
CHECK_NONFATAL(isValid == error_msg.empty());
76-
CHECK_NONFATAL(is_valid_parent == error_msg_parent.empty());
7775

7876
UniValue ret(UniValue::VOBJ);
7977
ret.pushKV("isvalid", isValid);

src/script/interpreter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3198,7 +3198,8 @@ uint256 ComputeTaprootMerkleRoot(Span<const unsigned char> control, const uint25
31983198
{
31993199
assert(control.size() >= TAPROOT_CONTROL_BASE_SIZE);
32003200
assert(control.size() <= TAPROOT_CONTROL_MAX_SIZE);
3201-
assert((control.size() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE == 0);
3201+
bool simplicity = (control[0] & TAPROOT_LEAF_MASK) == TAPROOT_LEAF_TAPSIMPLICITY; // ELEMENTS
3202+
assert((control.size() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE == 0 || simplicity);
32023203

32033204
const int path_len = (control.size() - TAPROOT_CONTROL_BASE_SIZE) / TAPROOT_CONTROL_NODE_SIZE;
32043205
uint256 k = tapleaf_hash;

src/test/fuzz/script.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ FUZZ_TARGET(script, .init = initialize_script)
153153
const CScript dest{GetScriptForDestination(tx_destination_1)};
154154
const bool valid{IsValidDestination(tx_destination_1)};
155155

156-
if (!std::get_if<PubKeyDestination>(&tx_destination_1)) {
156+
if (!std::get_if<PubKeyDestination>(&tx_destination_1) && !std::get_if<NullData>(&tx_destination_1)) {
157157
// Only try to round trip non-pubkey destinations since PubKeyDestination has no encoding
158+
// ELEMENTS: and non-nulldata
158159
Assert(dest.empty() != valid);
159160
Assert(tx_destination_1 == DecodeDestination(encoded_dest));
160161
Assert(valid == IsValidDestinationString(encoded_dest));

0 commit comments

Comments
 (0)