Robust – Earlybirds Invest https://earlybirdsinvest.com Latest Crypto News Tue, 09 Sep 2025 02:19:07 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.8 https://i0.wp.com/earlybirdsinvest.com/wp-content/uploads/2024/12/cropped-New-Project-2024-12-17T235703.455.png?fit=32%2C32&ssl=1 Robust – Earlybirds Invest https://earlybirdsinvest.com 32 32 240146708 How robust is the 1P1C transaction relay on Bitcoin Core 28.0? https://earlybirdsinvest.com/how-robust-is-the-1p1c-transaction-relay-on-bitcoin-core-28-0/ https://earlybirdsinvest.com/how-robust-is-the-1p1c-transaction-relay-on-bitcoin-core-28-0/#respond Tue, 09 Sep 2025 02:19:07 +0000 https://earlybirdsinvest.com/how-robust-is-the-1p1c-transaction-relay-on-bitcoin-core-28-0/

What does non-saving mean in this context?

Non-active means “we are missing things because we are not guaranteed, especially in the presence of enemies or when the volume is really high.” Also, the “package relay” in quotes refers to the fact that there is no package relay protocolpart of the opportunistic logic that can be seen when an orphanage transaction happens to be CPFping a failed transaction with low refueling.

Perhaps a good similarity is if you’re a restaurant chef who doesn’t have a dedicated server. Once you’re finished cooking, you can opportunistically bring food to the table, which is often fine, but delayed during rush hour. The ticket system is also not evaluated. If you can’t keep all the tickets, then random tickets will fall to the ground and forget to order them. One annoying customer can ruin someone else’s dining experience by ordering 100 diet cokes.

We can hire others to serve food. It certainly makes the restaurant more efficient (e.g. BIP 331, still WIP), but it doesn’t solve everything. Starting from 30.0, there is a strategy to limit customers to rates so they don’t forget to send out huge amounts (see “P2P: Improve Service Boundaries in Txorphanage” https://github.com/bitcoin/bitcoin/pull/31829).

Are there any situations where parents’ transactions cannot be confirmed yet?

The most important limitation of 28.0 is that Cook can only offer something very simple (1P1C package). Anything above 1P1C will not work. If the child has another unconfirmed parent, the logic of opportunism will not work, even if it is already in Mempools. This has also been changed (“Package Validation: Relax the package.

When broadcasting a transaction via SendRawTransaction, Bitcoin Core 28.0 automatically forms a 1P1C package

That’s the right thing to do. When you send a transaction to Mempool, the node does everything automatically. If it is a 0-FEE parent + child package, sendrawtransaction You might complain about the fees, so you submitpackage RPC (equivalent to multi-transactions sendrawtransaction (with a very similar API). RPCs also accept single transactions, so it may be most convenient to use them all the time.

]]>
https://earlybirdsinvest.com/how-robust-is-the-1p1c-transaction-relay-on-bitcoin-core-28-0/feed/ 0 57475
Bitcoin holding $100k psychological floor amid recent dip signals robust investor sentiment https://earlybirdsinvest.com/bitcoin-holding-100k-psychological-floor-amid-recent-dip-signals-robust-investor-sentiment/ https://earlybirdsinvest.com/bitcoin-holding-100k-psychological-floor-amid-recent-dip-signals-robust-investor-sentiment/#respond Tue, 10 Jun 2025 23:57:53 +0000 https://earlybirdsinvest.com/bitcoin-holding-100k-psychological-floor-amid-recent-dip-signals-robust-investor-sentiment/

On-chain data shows that Bitcoin’s (BTC) brief slide to $100,000 strengthened rather than weakened market structure, Glassnode said in a June 10 report.

Bitcoin is currently trading at $109,500, after an over 4% climb on June 9 to hit a weekly high of $110,600.

The report noted that the 9% drawdown following the June 7 record high of $111,965 resulted in only $200 million in realized losses, which is significantly lower than the prior corrections this cycle.

Capitulation limited to recent entrants

Most of the exits came from holders with BTC younger than one week, indicating capitulation by recent entrants rather than broad selling across seasoned wallets. Loss-taking by addresses that held Bitcoin for more than three months stood at zero during the move.

Meanwhile, open interest dropped by $2.3 billion, the seventh-largest deleveraging event since 2023. This movement suggested the decline was driven mainly by derivatives liquidation rather than spot distribution.

The price bounced before testing the short-term holder cost basis at $97,600 and stayed above the psychological $100,000 price level.

The report highlighted that holding that band keeps cyclical momentum intact because 41% of trading days since the 2022 bottom have experienced deeper pullbacks.

Long-term holders realized $930 million in profit per day at the recent peak, matching the pace recorded during March’s breakout above $100,000 but still well below the $1.64 billion peak seen in early April. 

Long-term holders retain supply

Even with higher spending, the cohort’s aggregate balance continued to climb, an uncommon pattern in late-cycle conditions. The report attributed the stickier supply to exchange-traded fund (ETF) custody programs and other institutional channels that remove coins from liquid circulation.

The realized profit-loss ratio for long-term holders reached 9.4, a threshold exceeded on fewer than 16% of trading days since 2011 and typically associated with euphoria. Meanwhile, the UTXO Realized Price Distribution shows a dense band of coins acquired around $100,000 to $103,000. 

Price now sits at the upper edge of that cluster, with relatively light historical volume above it, creating an “air gap” region that may allow rapid moves if demand persists.

Realized Supply Density, which measures the share of supply with a cost basis near the spot price, has increased alongside the recent rally, indicating heightened sensitivity.

Options traders appear unconcerned, as at-the-money implied volatility across both short and long tenors continues to fall, a posture that has preceded volatility spikes in past cycles. The report noted the contrast as a potential setup for larger moves if the price retests the all-time high.

For now, the muted reaction to last week’s decline and the swift recovery above $100,000 leave the uptrend intact and signal that demand absorbed the largest futures-driven shake-out in two months.

Mentioned in this article
]]>
https://earlybirdsinvest.com/bitcoin-holding-100k-psychological-floor-amid-recent-dip-signals-robust-investor-sentiment/feed/ 0 41308
Bitcoin Rally ‘Remains Robust’ as One BTC Metric Reaches Historic All-Time Highs, According to Glassnode https://earlybirdsinvest.com/bitcoin-rally-remains-robust-as-one-btc-metric-reaches-historic-all-time-highs-according-to-glassnode/ https://earlybirdsinvest.com/bitcoin-rally-remains-robust-as-one-btc-metric-reaches-historic-all-time-highs-according-to-glassnode/#respond Thu, 22 May 2025 21:19:10 +0000 https://earlybirdsinvest.com/bitcoin-rally-remains-robust-as-one-btc-metric-reaches-historic-all-time-highs-according-to-glassnode/

The latest rally sending Bitcoin (BTC) to new all-time highs is showing a lot of strength as one key metric reaches unprecedented levels, according to the digital asset analytics firm Glassnode.

Glassnode says that Bitcoin’s Realized Cap, which records the price at which each coin was last moved and aims to gauge how many holders are in profit or at a loss, is hitting a new all-time high.

“Strength in the digital asset market remains robust with Bitcoin continuing to consolidate just beneath its all-time high of $109,000. The elevation in price has raised the profitability of the vast majority of market investors, with many seizing the opportunity to lock in profits. As a result, capital inflows have increased markedly, pushing the Realized Cap above $900 billion for the first time, a historic milestone that underscores the depth of liquidity in the market.”

Glassnode also says that Short-Term Holders (STHs), those entities that have held their coins for less than 155 days, have sold at massive profits in the last month, while Bitcoin is absorbing the selling pressure.

“For the Short-Term Holders, the improvement in their portfolio values has directly translated into a notable increase in spending activity, with the cohort realizing over $11.4 billion of profit across the last month.”

Glassnode reports on the social media platform X that ever since Bitcoin plummeted to a local low of around $74,000 in early April, the market value to realized value (MVRV) metric – which gauges the market’s sentiment and valuation of a crypto asset – has soared for both STHs and Long-Term Holders (LTHs).

A rising MVRV means “holders are sitting on more unrealized profit – boosting confidence and reducing sell pressure,” according to the analytics firm.

“Since the $74,000 low:

  • MVRV: 1.74 to 2.33 (+74%  to +133%).
  • STH MVRV: 0.82 to 1.13 (from -18% loss to +13% gain).
  • LTH MVRV: 2.91 to 3.30 (+191% to +230%).

Profitability is up across the board, boosting confidence and supporting the rally.”

Bitcoin printed a new all-time high Wednesday, briefly breaking past $110,000 for the first time in its history.

The top crypto asset has since retraced, trading for $109,686 at time of writing, up 2.6% in the last 24 hours.

Follow us on X, Facebook and Telegram

Don’t Miss a Beat – Subscribe to get email alerts delivered directly to your inbox

Check Price Action

Surf The Daily Hodl Mix

&nbsp

Disclaimer: Opinions expressed at The Daily Hodl are not investment advice. Investors should do their due diligence before making any high-risk investments in Bitcoin, cryptocurrency or digital assets. Please be advised that your transfers and trades are at your own risk, and any losses you may incur are your responsibility. The Daily Hodl does not recommend the buying or selling of any cryptocurrencies or digital assets, nor is The Daily Hodl an investment advisor. Please note that The Daily Hodl participates in affiliate marketing.

Generated Image: Midjourney

]]>
https://earlybirdsinvest.com/bitcoin-rally-remains-robust-as-one-btc-metric-reaches-historic-all-time-highs-according-to-glassnode/feed/ 0 37736
Secured #6 – Writing Robust C – Best Practices for Finding and Preventing Vulnerabilities https://earlybirdsinvest.com/secured-6-writing-robust-c-best-practices-for-finding-and-preventing-vulnerabilities/ https://earlybirdsinvest.com/secured-6-writing-robust-c-best-practices-for-finding-and-preventing-vulnerabilities/#respond Tue, 18 Mar 2025 08:51:31 +0000 https://earlybirdsinvest.com/secured-6-writing-robust-c-best-practices-for-finding-and-preventing-vulnerabilities/

For EIP-4844, Ethereum clients need the ability to compute and verify KZG commitments. Rather than each client rolling their own crypto, researchers and developers came together to write c-kzg-4844, a relatively small C library with bindings for higher-level languages. The idea was to create a robust and efficient cryptographic library that all clients could use. The Protocol Security Research team at the Ethereum Foundation had the opportunity to review and improve this library. This blog post will discuss some things we do to make C projects more secure.


Fuzz

Fuzzing is a dynamic code testing technique that involves providing random inputs to discover bugs in a program. LibFuzzer and afl++ are two popular fuzzing frameworks for C projects. They are both in-process, coverage-guided, evolutionary fuzzing engines. For c-kzg-4844, we used LibFuzzer since we were already well-integrated with LLVM project’s other offerings.

Here’s the fuzzer for verify_kzg_proof, one of c-kzg-4844’s functions:

#include "../base_fuzz.h"

static const size_t COMMITMENT_OFFSET = 0;
static const size_t Z_OFFSET = COMMITMENT_OFFSET + BYTES_PER_COMMITMENT;
static const size_t Y_OFFSET = Z_OFFSET + BYTES_PER_FIELD_ELEMENT;
static const size_t PROOF_OFFSET = Y_OFFSET + BYTES_PER_FIELD_ELEMENT;
static const size_t INPUT_SIZE = PROOF_OFFSET + BYTES_PER_PROOF;

int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
    initialize();
    if (size == INPUT_SIZE) {
        bool ok;
        verify_kzg_proof(
            &ok,
            (const Bytes48 *)(data + COMMITMENT_OFFSET),
            (const Bytes32 *)(data + Z_OFFSET),
            (const Bytes32 *)(data + Y_OFFSET),
            (const Bytes48 *)(data + PROOF_OFFSET),
            &s
        );
    }
    return 0;
}

When executed, this is what the output looks like. If there were a problem, it would write the input to disk and stop executing. Ideally, you should be able to reproduce the problem.

There’s also differential fuzzing, which is a technique which fuzzes two or more implementations of the same interface and compares the outputs. For a given input, if the output is different, and you expected them to be the same, you know something is wrong. This technique is very popular in Ethereum because we like to have several implementations of the same thing. This diversification provides an extra level of safety, knowing that if one implementation were flawed the others may not have the same issue.

For KZG libraries, we developed kzg-fuzz which differentially fuzzes c-kzg-4844 (through its Golang bindings) and go-kzg-4844. So far, there haven’t been any differences.

Coverage

Next, we used llvm-profdata and llvm-cov to generate a coverage report from running the tests. This is a great way to verify code is executed (“covered”) and tested. See the coverage target in c-kzg-4844’s Makefile for an example of how to generate this report.

When this target is run (i.e., make coverage) it produces a table that serves as a high-level overview of how much of each function is executed. The exported functions are at the top and the non-exported (static) functions are on the bottom.

There is a lot of green in the table above, but there is some yellow and red too. To determine what is and isn’t being executed, refer to the HTML file (coverage.html) that was generated. This webpage shows the entire source file and highlights non-executed code in red. In this project’s case, most of the non-executed code deals with hard-to-test error cases such as memory allocation failures. For example, here’s some non-executed code:

At the beginning of this function, it checks that the trusted setup is big enough to perform a pairing check. There isn’t a test case which provides an invalid trusted setup, so this doesn’t get executed. Also, because we only test with the correct trusted setup, the result of is_monomial_form is always the same and doesn’t return the error value.

Profile

We don’t recommend this for all projects, but since c-kzg-4844 is a performance critical library we think it’s important to profile its exported functions and measure how long they take to execute. This can help identify inefficiencies which could potentially DoS nodes. For this, we used gperftools (Google Performance Tools) instead of llvm-xray because we found it to be more feature-rich and easier to use.

The following is a simple example which profiles my_function. Profiling works by checking which instruction is being executed every so often. If a function is fast enough, it may not be noticed by the profiler. To reduce the chance of this, you may need to call your function multiple times. In this example, we call my_function 1000 times.

#include 

int task_a(int n) {
    if (n <= 1) return 1;
    return task_a(n - 1) * n;
}

int task_b(int n) {
    if (n <= 1) return 1;
    return task_b(n - 2) + n;
}

void my_function(void) {
    for (int i = 0; i < 500; i++) {
        if (i % 2 == 0) {
            task_a(i);
        } else {
            task_b(i);
        }
    }
}

int main(void) {
    ProfilerStart("example.prof");
    for (int i = 0; i < 1000; i++) {
        my_function();
    }
    ProfilerStop();
    return 0;
}

Use ProfilerStart(““) and ProfilerStop() to mark which parts of your program to profile. When re-compiled and executed, it will write a file to disk with profiling data. You can then use pprof to visualize this data.

Here is the graph generated from the command above:

Here’s a bigger example from one of c-kzg-4844’s functions. The following image is the profiling graph for compute_blob_kzg_proof. As you can see, 80% of this function’s time is spent performing Montgomery multiplications. This is expected.

Reverse

Next, view your binary in a software reverse engineering (SRE) tool such as Ghidra or IDA. These tools can help you understand how high-level constructs are translated into low-level machine code. We think it helps to review your code this way; like how reading a paper in a different font will force your brain to interpret sentences differently. It’s also useful to see what type of optimizations your compiler makes. It’s rare, but sometimes the compiler will optimize out something which it deemed unnecessary. Keep an eye out for this, something like this actually happened in c-kzg-4844, some of the tests were being optimized out.

When you view a decompiled function, it will not have variable names, complex types, or comments. When compiled, this information isn’t included in the binary. It will be up to you to reverse engineer this. You’ll often see functions are inlined into a single function, multiple variables declared in code are optimized into a single buffer, and the order of checks are different. These are just compiler optimizations and are generally fine. It may help to build your binary with DWARF debugging information; most SREs can analyze this section to provide better results.

For example, this is what blob_to_kzg_commitment initially looks like in Ghidra:

With a little work, you can rename variables and add comments to make it easier to read. Here’s what it could look like after a few minutes:

Static Analysis

Clang comes built-in with the Clang Static Analyzer, which is an excellent static analysis tool that can identify many problems that the compiler will miss. As the name “static” suggests, it examines code without executing it. This is slower than the compiler, but a lot faster than “dynamic” analysis tools which execute code.

Here’s a simple example which forgets to free arr (and has another problem but we will talk more about that later). The compiler will not identify this, even with all warnings enabled because technically this is completely valid code.

#include 

int main(void) {
    int* arr = malloc(5 * sizeof(int));
    arr[5] = 42;
    return 0;
}

The unix.Malloc checker will identify that arr wasn’t freed. The line in the warning message is a bit misleading, but it makes sense if you think about it; the analyzer reached the return statement and noticed that the memory hadn’t been freed.

Not all of the findings are that simple though. Here’s a finding that Clang Static Analyzer found in c-kzg-4844 when initially introduced to the project:

Given an unexpected input, it was possible to shift this value by 32 bits which is undefined behavior. The solution was to restrict the input with CHECK(log2_pow2(n) != 0) so that this was impossible. Good job, Clang Static Analyzer!

Sanitize

Santizers are dynamic analysis tools which instrument (add instructions) to programs which can point out issues during execution. These are particularly useful at finding common mistakes associated with memory handling. Clang comes built-in with several sanitizers; here are the four we find most useful and easy to use.

Address

AddressSanitizer (ASan) is a fast memory error detector which can identify out-of-bounds accesses, use-after-free, use-after-return, use-after-scope, double-free, and memory leaks.

Here is the same example from earlier. It forgets to free arr and it will set the 6th element in a 5 element array. This is a simple example of a heap-buffer-overflow:

#include 

int main(void) {
    int* arr = malloc(5 * sizeof(int));
    arr[5] = 42;
    return 0;
}

When compiled with -fsanitize=address and executed, it will output the following error message. This points you in a good direction (a 4-byte write in main). This binary could be viewed in a disassembler to figure out exactly which instruction (at main+0x84) is causing the problem.

Similarly, here’s an example where it finds a heap-use-after-free:

#include 

int main(void) {
    int *arr = malloc(5 * sizeof(int));
    free(arr);
    return arr[2];
}

It tells you that there’s a 4-byte read of freed memory at main+0x8c.

Memory

MemorySanitizer (MSan) is a detector of uninitialized reads. Here’s a simple example which reads (and returns) an uninitialized value:

int main(void) {
    int data[2];
    return data[0];
}

When compiled with -fsanitize=memory and executed, it will output the following error message:

Undefined Behavior

UndefinedBehaviorSanitizer (UBSan) detects undefined behavior, which refers to the situation where a program’s behavior is unpredictable and not specified by the langauge standard. Some common examples of this are accessing out-of-bounds memory, dereferencing an invalid pointer, reading uninitialized variables, and overflow of a signed integer. For example, here we increment INT_MAX which is undefined behavior.

#include 

int main(void) {
    int a = INT_MAX;
    return a + 1;
}

When compiled with -fsanitize=undefined and executed, it will output the following error message which tells us exactly where the problem is and what the conditions are:

Thread

ThreadSanitizer (TSan) detects data races, which can occur in multi-threaded programs when two or more threads access a shared memory location at the same time. This situation introduces unpredictability and can lead to undefined behavior. Here’s an example in which two threads increment a global counter variable. There aren’t any locks or semaphores, so it’s entirely possible that these two threads will increment the variable at the same time.

#include 

int counter = 0;

void *increment(void *arg) {
    (void)arg;
    for (int i = 0; i < 1000000; i++)
        counter++;
    return NULL;
}

int main(void) {
    pthread_t thread1, thread2;
    pthread_create(&thread1, NULL, increment, NULL);
    pthread_create(&thread2, NULL, increment, NULL);
    pthread_join(thread1, NULL);
    pthread_join(thread2, NULL);
    return 0;
}

When compiled with -fsanitize=thread and executed, it will output the following error message:

This error message tells us that there’s a data race. In two threads, the increment function is writing to the same 4 bytes at the same time. It even tells us that the memory is counter.

Valgrind

Valgrind is a powerful instrumentation framework for building dynamic analysis tools, but its best known for identifying memory errors and leaks with its built-in Memcheck tool.

The following image shows the output from running c-kzg-4844’s tests with Valgrind. In the red box is a valid finding for a “conditional jump or move [that] depends on uninitialized value(s).”

This identified an edge case in expand_root_of_unity. If the wrong root of unity or width were provided, it was possible that the loop will break before out[width] was initialized. In this situation, the final check would depend on an uninitialized value.

static C_KZG_RET expand_root_of_unity(
    fr_t *out, const fr_t *root, uint64_t width
) {
    out[0] = FR_ONE;
    out[1] = *root;

    for (uint64_t i = 2; !fr_is_one(&out[i - 1]); i++) {
        CHECK(i <= width);
        blst_fr_mul(&out[i], &out[i - 1], root);
    }
    CHECK(fr_is_one(&out[width]));

    return C_KZG_OK;
}

Security Review

After development stabilizes, it’s been thoroughly tested, and your team has manually reviewed the codebase themselves multiple times, it’s time to get a security review by a reputable security group. This won’t be a stamp of approval, but it shows that your project is at least somewhat secure. Keep in mind there is no such thing as perfect security. There will always be the risk of vulnerabilities.

For c-kzg-4844 and go-kzg-4844, the Ethereum Foundation contracted Sigma Prime to conduct a security review. They produced this report with 8 findings. It contains one critical vulnerability in go-kzg-4844 that was a really good find. The BLS12-381 library that go-kzg-4844 uses, gnark-crypto, had a bug which allowed invalid G1 and G2 points to be sucessfully decoded. Had this not been fixed, this could have resulted in a consensus bug (a disagreement between implementations) in Ethereum.

Bug Bounty

If a vulnerability in your project could be exploited for gains, like it is for Ethereum, consider setting up a bug bounty program. This allows security researchers, or anyone really, to submit vulnerability reports in exchange for money. Generally, this is specifically for findings which can prove that an exploit is possible. If the bug bounty payouts are reasonable, bug finders will notify you of the bug rather than exploiting it or selling it to another party. We recommend starting your bug bounty program after the findings from the first security review are resolved; ideally, the security review would cost less than the bug bounty payouts.

Conclusion

The development of robust C projects, especially in the critical domain of blockchain and cryptocurrencies, requires a multi-faceted approach. Given the inherent vulnerabilities associated with the C language, a combination of best practices and tools is essential for producing resilient software. We hope our experiences and findings from our work with c-kzg-4844 provide valuable insights and best practices for others embarking on similar projects.

]]>
https://earlybirdsinvest.com/secured-6-writing-robust-c-best-practices-for-finding-and-preventing-vulnerabilities/feed/ 0 25798