public static long deriveChainId(long v) {
        if (v == LOWER_REAL_V || v == (LOWER_REAL_V + 1)) {
            return 0L;
        }
        return (v - CHAIN_ID_INC) / 2;
    }
@Test
    void deriveChainIdWhenLegacySignature() {
        long v1 = 27;
        long v2 = 28;

        long chainId_1 = TransactionUtils.deriveChainId(v1);
        long chainId_2 = TransactionUtils.deriveChainId(v2);

        assertEquals(0, chainId_1);
        assertEquals(0, chainId_2);
    }