profile
viewpoint

TAPPGuild/bitjws 3

JWS using Bitcoin message signing

cryptocap/ccapi-v3-docs 0

Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

deginner/lamassu-dash-plugin 0

Lamassu plugins for DASH

issue commentbitcoin-core/secp256k1

UB in tests: Invalid pointer comparison in secp256k1_fe_inv_all_var

Here's a simpler solution: Remove the function, it's currently unused. Was this function intended for ECDSA batch verification?

practicalswift

comment created time in an hour

issue commentformatjs/formatjs

"Missing locale data for"

Do u have a reproducible repo of some sort? Can you use Intl.DateTimeFormat? Date.toLocaleString is significantly slower.

devnix

comment created time in 8 hours

issue commentformatjs/formatjs

Support multiline template literals

ts-transformer did it primarily bc of historical reasons. In cases where IDs are autogen as hash from defaultMessage & description, trimming whitespace results in ID mismatch so we prefer linting the source instead. Otherwise you have to do it both at runtime, everytime, and build time, which is brittle and annoying to debug.

hjylewis

comment created time in 8 hours

issue commentformatjs/formatjs

if no manual explicit id is added: [React Intl] An `id` must be provided to format a message.

@kkuzmina are you using create-react-app?

mudrz

comment created time in 8 hours

Pull request review commentbitcoin-core/secp256k1

Safegcd inverses, drop Jacobi symbols, remove libgmp

+/***********************************************************************+ * Copyright (c) 2020 Peter Dettman                                    *+ * Distributed under the MIT software license, see the accompanying    *+ * file COPYING or https://www.opensource.org/licenses/mit-license.php.*+ **********************************************************************/++#ifndef SECP256K1_MODINV64_IMPL_H+#define SECP256K1_MODINV64_IMPL_H++#include "modinv64.h"++#include "util.h"++/* This file implements modular inversion based on the paper "Fast constant-time gcd computation and+ * modular inversion" by Daniel J. Bernstein and Bo-Yin Yang.+ *+ * For an explanation of the algorithm, see doc/safegcd_implementation.md. This file contains an+ * implementation for N=62, using 62-bit signed limbs represented as int64_t.+ */++/* Optionally negate a signed62 number in range (-2*modulus,modulus), and add multiple of modulus to+ * bring it to [0,modulus). The input must have limbs in range (-2^62,2^62). The output will have+ * limbs in range [0,2^62). */+static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int64_t cond_negate, const secp256k1_modinv64_modinfo *modinfo) {+    const int64_t M62 = (int64_t)(UINT64_MAX >> 2);+    int64_t r0 = r->v[0], r1 = r->v[1], r2 = r->v[2], r3 = r->v[3], r4 = r->v[4];+    int64_t cond_add;++    /* In a first step, add the modulus if the input is negative, and then negate if requested.+     * This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input+     * limbs are in range (-2^62,2^62), this cannot overflow an int64_t. */+    cond_add = r4 >> 63;+    r0 += modinfo->modulus.v[0] & cond_add;+    r1 += modinfo->modulus.v[1] & cond_add;+    r2 += modinfo->modulus.v[2] & cond_add;+    r3 += modinfo->modulus.v[3] & cond_add;+    r4 += modinfo->modulus.v[4] & cond_add;+    r0 = (r0 ^ cond_negate) - cond_negate;+    r1 = (r1 ^ cond_negate) - cond_negate;+    r2 = (r2 ^ cond_negate) - cond_negate;+    r3 = (r3 ^ cond_negate) - cond_negate;+    r4 = (r4 ^ cond_negate) - cond_negate;+    /* Propagate the top bits, to bring limbs back to range (-2^62,2^62). */+    r1 += r0 >> 62; r0 &= M62;+    r2 += r1 >> 62; r1 &= M62;+    r3 += r2 >> 62; r2 &= M62;+    r4 += r3 >> 62; r3 &= M62;++    /* In a second step add the modulus again if the result is still negative, bringing+     * r to range [0,modulus). */+    cond_add = r4 >> 63;+    r0 += modinfo->modulus.v[0] & cond_add;+    r1 += modinfo->modulus.v[1] & cond_add;+    r2 += modinfo->modulus.v[2] & cond_add;+    r3 += modinfo->modulus.v[3] & cond_add;+    r4 += modinfo->modulus.v[4] & cond_add;+    /* And propagate again. */+    r1 += r0 >> 62; r0 &= M62;+    r2 += r1 >> 62; r1 &= M62;+    r3 += r2 >> 62; r2 &= M62;+    r4 += r3 >> 62; r3 &= M62;++    r->v[0] = r0;+    r->v[1] = r1;+    r->v[2] = r2;+    r->v[3] = r3;+    r->v[4] = r4;++#ifdef VERIFY+    VERIFY_CHECK(r->v[0] >> 62 == 0);+    VERIFY_CHECK(r->v[1] >> 62 == 0);+    VERIFY_CHECK(r->v[2] >> 62 == 0);+    VERIFY_CHECK(r->v[3] >> 62 == 0);+    VERIFY_CHECK(r->v[4] >>  8 == 0);+#endif+}++/* Data type for transition matrices (see section 3 of explanation).+ *+ * t = [ u  v ]+ *     [ q  r ]+ */+typedef struct {+    int64_t u, v, q, r;+} secp256k1_modinv64_trans2x2;++/* Compute the transition matrix and eta for 62 divsteps.+ *+ * Input:  eta: initial eta+ *         f0:  bottom limb of initial f+ *         g0:  bottom limb of initial g+ * Output: t: transition matrix+ * Return: final eta+ *+ * Implements the divsteps_n_matrix function from the explanation.+ */+static uint64_t secp256k1_modinv64_divsteps_62(uint64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {+    uint64_t u = 1, v = 0, q = 0, r = 1; /* start with identity matrix */+    uint64_t c1, c2, f = f0, g = g0, x, y, z;+    int i;++    for (i = 0; i < 62; ++i) {+        VERIFY_CHECK((f & 1) == 1); /* f must always be odd */+        VERIFY_CHECK((u * f0 + v * g0) == f << i);+        VERIFY_CHECK((q * f0 + r * g0) == g << i);+        /* Compute conditional masks for (eta < 0) and for (g & 1). */+        c1 = (int64_t)eta >> 63;+        c2 = -(g & 1);+        /* Compute x,y,z, conditionally negated versions of f,u,v. */+        x = (f ^ c1) - c1;+        y = (u ^ c1) - c1;+        z = (v ^ c1) - c1;+        /* Conditionally add x,y,z to g,q,r. */+        g += x & c2;+        q += y & c2;+        r += z & c2;+        /* In what follows, c1 is a condition mask for (eta < 0) and (g & 1). */+        c1 &= c2;+        /* Conditionally negate eta, and unconditionally subtract 1. */+        eta = (eta ^ c1) - (c1 + 1);+        /* Conditionally add g,q,r to f,u,v. */+        f += g & c1;+        u += q & c1;+        v += r & c1;+        /* Shifts */+        g >>= 1;+        u <<= 1;+        v <<= 1;+    }+    /* Return data in t and return value. */+    t->u = (int64_t)u;+    t->v = (int64_t)v;+    t->q = (int64_t)q;+    t->r = (int64_t)r;+    return eta;+}++/* Compute the transition matrix and eta for 62 divsteps (variable time).+ *+ * Input:  eta: initial eta+ *         f0:  bottom limb of initial f+ *         g0:  bottom limb of initial g+ * Output: t: transition matrix+ * Return: final eta+ *+ * Implements the divsteps_n_matrix_var function from the explanation.+ */+static uint64_t secp256k1_modinv64_divsteps_62_var(uint64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {+    /* inv256[i] = -(2*i+1)^-1 (mod 256) */+    static const uint8_t inv256[128] = {+        0xFF, 0x55, 0x33, 0x49, 0xC7, 0x5D, 0x3B, 0x11, 0x0F, 0xE5, 0xC3, 0x59,+        0xD7, 0xED, 0xCB, 0x21, 0x1F, 0x75, 0x53, 0x69, 0xE7, 0x7D, 0x5B, 0x31,+        0x2F, 0x05, 0xE3, 0x79, 0xF7, 0x0D, 0xEB, 0x41, 0x3F, 0x95, 0x73, 0x89,+        0x07, 0x9D, 0x7B, 0x51, 0x4F, 0x25, 0x03, 0x99, 0x17, 0x2D, 0x0B, 0x61,+        0x5F, 0xB5, 0x93, 0xA9, 0x27, 0xBD, 0x9B, 0x71, 0x6F, 0x45, 0x23, 0xB9,+        0x37, 0x4D, 0x2B, 0x81, 0x7F, 0xD5, 0xB3, 0xC9, 0x47, 0xDD, 0xBB, 0x91,+        0x8F, 0x65, 0x43, 0xD9, 0x57, 0x6D, 0x4B, 0xA1, 0x9F, 0xF5, 0xD3, 0xE9,+        0x67, 0xFD, 0xDB, 0xB1, 0xAF, 0x85, 0x63, 0xF9, 0x77, 0x8D, 0x6B, 0xC1,+        0xBF, 0x15, 0xF3, 0x09, 0x87, 0x1D, 0xFB, 0xD1, 0xCF, 0xA5, 0x83, 0x19,+        0x97, 0xAD, 0x8B, 0xE1, 0xDF, 0x35, 0x13, 0x29, 0xA7, 0x3D, 0x1B, 0xF1,+        0xEF, 0xC5, 0xA3, 0x39, 0xB7, 0xCD, 0xAB, 0x01+    };++    uint64_t u = 1, v = 0, q = 0, r = 1; /* Start with identity matrix */+    uint64_t f = f0, g = g0, m, x, y, z;+    uint32_t w;+    int i = 62, limit, zeros;++    for (;;) {+        /* Use a sentinel bit to count zeros only up to i. */+        zeros = secp256k1_ctz64_var(g | (UINT64_MAX << i));+        /* Perform zeros divsteps at once; they all just divide g by two. */+        g >>= zeros;+        u <<= zeros;+        v <<= zeros;+        eta -= zeros;+        i -= zeros;+        /* We're done once we've done 62 divsteps. */+        if (i == 0) break;+        VERIFY_CHECK((f & 1) == 1);+        VERIFY_CHECK((g & 1) == 1);+        VERIFY_CHECK((u * f0 + v * g0) == f << (62 - i));+        VERIFY_CHECK((q * f0 + r * g0) == g << (62 - i));+        /* If eta is negative, negate it and replace f,g with g,-f. */+        if ((int64_t)eta < 0) {+            eta = -eta;+            x = f; f = g; g = -x;+            y = u; u = q; q = -y;+            z = v; v = r; r = -z;+        }+        /* eta is now >= 0. In what follows we're going to cancel out the bottom bits of g. No more+         * than i can be cancelled out (as we'd be done before that point), and no more than eta+1+         * can be done as its sign will flip once that happens. */+        limit = ((int)eta + 1) > i ? i : ((int)eta + 1);+        /* m is a mask for the bottom min(limit, 8) bits (our table only supports 8 bits). */+        m = (UINT64_MAX >> (64 - limit)) & 255U;

Added a VERIFY_CHECK for the range of limit.

sipa

comment created time in 11 hours

Pull request review commentbitcoin-core/secp256k1

Safegcd inverses, drop Jacobi symbols, remove libgmp

+/***********************************************************************+ * Copyright (c) 2020 Peter Dettman                                    *+ * Distributed under the MIT software license, see the accompanying    *+ * file COPYING or https://www.opensource.org/licenses/mit-license.php.*+ **********************************************************************/++#ifndef SECP256K1_MODINV64_IMPL_H+#define SECP256K1_MODINV64_IMPL_H++#include "modinv64.h"++#include "util.h"++/* This file implements modular inversion based on the paper "Fast constant-time gcd computation and+ * modular inversion" by Daniel J. Bernstein and Bo-Yin Yang.+ *+ * For an explanation of the algorithm, see doc/safegcd_implementation.md. This file contains an+ * implementation for N=62, using 62-bit signed limbs represented as int64_t.+ */++/* Optionally negate a signed62 number in range (-2*modulus,modulus), and add multiple of modulus to+ * bring it to [0,modulus). The input must have limbs in range (-2^62,2^62). The output will have+ * limbs in range [0,2^62). */+static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int64_t cond_negate, const secp256k1_modinv64_modinfo *modinfo) {+    const int64_t M62 = (int64_t)(UINT64_MAX >> 2);+    int64_t r0 = r->v[0], r1 = r->v[1], r2 = r->v[2], r3 = r->v[3], r4 = r->v[4];+    int64_t cond_add;++    /* In a first step, add the modulus if the input is negative, and then negate if requested.+     * This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input+     * limbs are in range (-2^62,2^62), this cannot overflow an int64_t. */+    cond_add = r4 >> 63;+    r0 += modinfo->modulus.v[0] & cond_add;+    r1 += modinfo->modulus.v[1] & cond_add;+    r2 += modinfo->modulus.v[2] & cond_add;+    r3 += modinfo->modulus.v[3] & cond_add;+    r4 += modinfo->modulus.v[4] & cond_add;+    r0 = (r0 ^ cond_negate) - cond_negate;+    r1 = (r1 ^ cond_negate) - cond_negate;+    r2 = (r2 ^ cond_negate) - cond_negate;+    r3 = (r3 ^ cond_negate) - cond_negate;+    r4 = (r4 ^ cond_negate) - cond_negate;+    /* Propagate the top bits, to bring limbs back to range (-2^62,2^62). */+    r1 += r0 >> 62; r0 &= M62;+    r2 += r1 >> 62; r1 &= M62;+    r3 += r2 >> 62; r2 &= M62;+    r4 += r3 >> 62; r3 &= M62;++    /* In a second step add the modulus again if the result is still negative, bringing+     * r to range [0,modulus). */+    cond_add = r4 >> 63;+    r0 += modinfo->modulus.v[0] & cond_add;+    r1 += modinfo->modulus.v[1] & cond_add;+    r2 += modinfo->modulus.v[2] & cond_add;+    r3 += modinfo->modulus.v[3] & cond_add;+    r4 += modinfo->modulus.v[4] & cond_add;+    /* And propagate again. */+    r1 += r0 >> 62; r0 &= M62;+    r2 += r1 >> 62; r1 &= M62;+    r3 += r2 >> 62; r2 &= M62;+    r4 += r3 >> 62; r3 &= M62;++    r->v[0] = r0;+    r->v[1] = r1;+    r->v[2] = r2;+    r->v[3] = r3;+    r->v[4] = r4;++#ifdef VERIFY+    VERIFY_CHECK(r->v[0] >> 62 == 0);+    VERIFY_CHECK(r->v[1] >> 62 == 0);+    VERIFY_CHECK(r->v[2] >> 62 == 0);+    VERIFY_CHECK(r->v[3] >> 62 == 0);+    VERIFY_CHECK(r->v[4] >>  8 == 0);+#endif+}++/* Data type for transition matrices (see section 3 of explanation).+ *+ * t = [ u  v ]+ *     [ q  r ]+ */+typedef struct {+    int64_t u, v, q, r;+} secp256k1_modinv64_trans2x2;++/* Compute the transition matrix and eta for 62 divsteps.+ *+ * Input:  eta: initial eta+ *         f0:  bottom limb of initial f+ *         g0:  bottom limb of initial g+ * Output: t: transition matrix+ * Return: final eta+ *+ * Implements the divsteps_n_matrix function from the explanation.+ */+static uint64_t secp256k1_modinv64_divsteps_62(uint64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {+    uint64_t u = 1, v = 0, q = 0, r = 1; /* start with identity matrix */+    uint64_t c1, c2, f = f0, g = g0, x, y, z;+    int i;++    for (i = 0; i < 62; ++i) {+        VERIFY_CHECK((f & 1) == 1); /* f must always be odd */+        VERIFY_CHECK((u * f0 + v * g0) == f << i);+        VERIFY_CHECK((q * f0 + r * g0) == g << i);+        /* Compute conditional masks for (eta < 0) and for (g & 1). */+        c1 = (int64_t)eta >> 63;+        c2 = -(g & 1);+        /* Compute x,y,z, conditionally negated versions of f,u,v. */+        x = (f ^ c1) - c1;+        y = (u ^ c1) - c1;+        z = (v ^ c1) - c1;+        /* Conditionally add x,y,z to g,q,r. */+        g += x & c2;+        q += y & c2;+        r += z & c2;+        /* In what follows, c1 is a condition mask for (eta < 0) and (g & 1). */+        c1 &= c2;+        /* Conditionally negate eta, and unconditionally subtract 1. */+        eta = (eta ^ c1) - (c1 + 1);+        /* Conditionally add g,q,r to f,u,v. */+        f += g & c1;+        u += q & c1;+        v += r & c1;+        /* Shifts */+        g >>= 1;+        u <<= 1;+        v <<= 1;+    }+    /* Return data in t and return value. */+    t->u = (int64_t)u;+    t->v = (int64_t)v;+    t->q = (int64_t)q;+    t->r = (int64_t)r;+    return eta;+}++/* Compute the transition matrix and eta for 62 divsteps (variable time).+ *+ * Input:  eta: initial eta+ *         f0:  bottom limb of initial f+ *         g0:  bottom limb of initial g+ * Output: t: transition matrix+ * Return: final eta+ *+ * Implements the divsteps_n_matrix_var function from the explanation.+ */+static uint64_t secp256k1_modinv64_divsteps_62_var(uint64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {+    /* inv256[i] = -(2*i+1)^-1 (mod 256) */+    static const uint8_t inv256[128] = {+        0xFF, 0x55, 0x33, 0x49, 0xC7, 0x5D, 0x3B, 0x11, 0x0F, 0xE5, 0xC3, 0x59,+        0xD7, 0xED, 0xCB, 0x21, 0x1F, 0x75, 0x53, 0x69, 0xE7, 0x7D, 0x5B, 0x31,+        0x2F, 0x05, 0xE3, 0x79, 0xF7, 0x0D, 0xEB, 0x41, 0x3F, 0x95, 0x73, 0x89,+        0x07, 0x9D, 0x7B, 0x51, 0x4F, 0x25, 0x03, 0x99, 0x17, 0x2D, 0x0B, 0x61,+        0x5F, 0xB5, 0x93, 0xA9, 0x27, 0xBD, 0x9B, 0x71, 0x6F, 0x45, 0x23, 0xB9,+        0x37, 0x4D, 0x2B, 0x81, 0x7F, 0xD5, 0xB3, 0xC9, 0x47, 0xDD, 0xBB, 0x91,+        0x8F, 0x65, 0x43, 0xD9, 0x57, 0x6D, 0x4B, 0xA1, 0x9F, 0xF5, 0xD3, 0xE9,+        0x67, 0xFD, 0xDB, 0xB1, 0xAF, 0x85, 0x63, 0xF9, 0x77, 0x8D, 0x6B, 0xC1,+        0xBF, 0x15, 0xF3, 0x09, 0x87, 0x1D, 0xFB, 0xD1, 0xCF, 0xA5, 0x83, 0x19,+        0x97, 0xAD, 0x8B, 0xE1, 0xDF, 0x35, 0x13, 0x29, 0xA7, 0x3D, 0x1B, 0xF1,+        0xEF, 0xC5, 0xA3, 0x39, 0xB7, 0xCD, 0xAB, 0x01+    };++    uint64_t u = 1, v = 0, q = 0, r = 1; /* Start with identity matrix */+    uint64_t f = f0, g = g0, m, x, y, z;+    uint32_t w;+    int i = 62, limit, zeros;++    for (;;) {+        /* Use a sentinel bit to count zeros only up to i. */+        zeros = secp256k1_ctz64_var(g | (UINT64_MAX << i));+        /* Perform zeros divsteps at once; they all just divide g by two. */+        g >>= zeros;+        u <<= zeros;+        v <<= zeros;+        eta -= zeros;+        i -= zeros;+        /* We're done once we've done 62 divsteps. */+        if (i == 0) break;+        VERIFY_CHECK((f & 1) == 1);+        VERIFY_CHECK((g & 1) == 1);+        VERIFY_CHECK((u * f0 + v * g0) == f << (62 - i));+        VERIFY_CHECK((q * f0 + r * g0) == g << (62 - i));+        /* If eta is negative, negate it and replace f,g with g,-f. */+        if ((int64_t)eta < 0) {+            eta = -eta;+            x = f; f = g; g = -x;+            y = u; u = q; q = -y;+            z = v; v = r; r = -z;+        }+        /* eta is now >= 0. In what follows we're going to cancel out the bottom bits of g. No more+         * than i can be cancelled out (as we'd be done before that point), and no more than eta+1+         * can be done as its sign will flip once that happens. */+        limit = ((int)eta + 1) > i ? i : ((int)eta + 1);

I've added VERIFY_CHECK statements to check the range of eta.

sipa

comment created time in 11 hours

Pull request review commentbitcoin-core/secp256k1

Safegcd inverses, drop Jacobi symbols, remove libgmp

+/***********************************************************************+ * Copyright (c) 2020 Peter Dettman                                    *+ * Distributed under the MIT software license, see the accompanying    *+ * file COPYING or https://www.opensource.org/licenses/mit-license.php.*+ **********************************************************************/++#ifndef SECP256K1_MODINV64_IMPL_H+#define SECP256K1_MODINV64_IMPL_H++#include "modinv64.h"++#include "util.h"++/* This file implements modular inversion based on the paper "Fast constant-time gcd computation and+ * modular inversion" by Daniel J. Bernstein and Bo-Yin Yang.+ *+ * For an explanation of the algorithm, see doc/safegcd_implementation.md. This file contains an+ * implementation for N=62, using 62-bit signed limbs represented as int64_t.+ */++/* Optionally negate a signed62 number in range (-2*modulus,modulus), and add multiple of modulus to+ * bring it to [0,modulus). The input must have limbs in range (-2^62,2^62). The output will have+ * limbs in range [0,2^62). */+static void secp256k1_modinv64_normalize_62(secp256k1_modinv64_signed62 *r, int64_t cond_negate, const secp256k1_modinv64_modinfo *modinfo) {+    const int64_t M62 = (int64_t)(UINT64_MAX >> 2);+    int64_t r0 = r->v[0], r1 = r->v[1], r2 = r->v[2], r3 = r->v[3], r4 = r->v[4];+    int64_t cond_add;++    /* In a first step, add the modulus if the input is negative, and then negate if requested.+     * This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input+     * limbs are in range (-2^62,2^62), this cannot overflow an int64_t. */+    cond_add = r4 >> 63;+    r0 += modinfo->modulus.v[0] & cond_add;+    r1 += modinfo->modulus.v[1] & cond_add;+    r2 += modinfo->modulus.v[2] & cond_add;+    r3 += modinfo->modulus.v[3] & cond_add;+    r4 += modinfo->modulus.v[4] & cond_add;+    r0 = (r0 ^ cond_negate) - cond_negate;+    r1 = (r1 ^ cond_negate) - cond_negate;+    r2 = (r2 ^ cond_negate) - cond_negate;+    r3 = (r3 ^ cond_negate) - cond_negate;+    r4 = (r4 ^ cond_negate) - cond_negate;+    /* Propagate the top bits, to bring limbs back to range (-2^62,2^62). */+    r1 += r0 >> 62; r0 &= M62;+    r2 += r1 >> 62; r1 &= M62;+    r3 += r2 >> 62; r2 &= M62;+    r4 += r3 >> 62; r3 &= M62;++    /* In a second step add the modulus again if the result is still negative, bringing+     * r to range [0,modulus). */+    cond_add = r4 >> 63;+    r0 += modinfo->modulus.v[0] & cond_add;+    r1 += modinfo->modulus.v[1] & cond_add;+    r2 += modinfo->modulus.v[2] & cond_add;+    r3 += modinfo->modulus.v[3] & cond_add;+    r4 += modinfo->modulus.v[4] & cond_add;+    /* And propagate again. */+    r1 += r0 >> 62; r0 &= M62;+    r2 += r1 >> 62; r1 &= M62;+    r3 += r2 >> 62; r2 &= M62;+    r4 += r3 >> 62; r3 &= M62;++    r->v[0] = r0;+    r->v[1] = r1;+    r->v[2] = r2;+    r->v[3] = r3;+    r->v[4] = r4;++#ifdef VERIFY+    VERIFY_CHECK(r->v[0] >> 62 == 0);+    VERIFY_CHECK(r->v[1] >> 62 == 0);+    VERIFY_CHECK(r->v[2] >> 62 == 0);+    VERIFY_CHECK(r->v[3] >> 62 == 0);+    VERIFY_CHECK(r->v[4] >>  8 == 0);+#endif+}++/* Data type for transition matrices (see section 3 of explanation).+ *+ * t = [ u  v ]+ *     [ q  r ]+ */+typedef struct {+    int64_t u, v, q, r;+} secp256k1_modinv64_trans2x2;++/* Compute the transition matrix and eta for 62 divsteps.+ *+ * Input:  eta: initial eta+ *         f0:  bottom limb of initial f+ *         g0:  bottom limb of initial g+ * Output: t: transition matrix+ * Return: final eta+ *+ * Implements the divsteps_n_matrix function from the explanation.+ */+static uint64_t secp256k1_modinv64_divsteps_62(uint64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {+    uint64_t u = 1, v = 0, q = 0, r = 1; /* start with identity matrix */+    uint64_t c1, c2, f = f0, g = g0, x, y, z;+    int i;++    for (i = 0; i < 62; ++i) {+        VERIFY_CHECK((f & 1) == 1); /* f must always be odd */+        VERIFY_CHECK((u * f0 + v * g0) == f << i);+        VERIFY_CHECK((q * f0 + r * g0) == g << i);+        /* Compute conditional masks for (eta < 0) and for (g & 1). */+        c1 = (int64_t)eta >> 63;+        c2 = -(g & 1);+        /* Compute x,y,z, conditionally negated versions of f,u,v. */+        x = (f ^ c1) - c1;+        y = (u ^ c1) - c1;+        z = (v ^ c1) - c1;+        /* Conditionally add x,y,z to g,q,r. */+        g += x & c2;+        q += y & c2;+        r += z & c2;+        /* In what follows, c1 is a condition mask for (eta < 0) and (g & 1). */+        c1 &= c2;+        /* Conditionally negate eta, and unconditionally subtract 1. */+        eta = (eta ^ c1) - (c1 + 1);+        /* Conditionally add g,q,r to f,u,v. */+        f += g & c1;+        u += q & c1;+        v += r & c1;+        /* Shifts */+        g >>= 1;+        u <<= 1;+        v <<= 1;+    }+    /* Return data in t and return value. */+    t->u = (int64_t)u;+    t->v = (int64_t)v;+    t->q = (int64_t)q;+    t->r = (int64_t)r;+    return eta;+}++/* Compute the transition matrix and eta for 62 divsteps (variable time).+ *+ * Input:  eta: initial eta+ *         f0:  bottom limb of initial f+ *         g0:  bottom limb of initial g+ * Output: t: transition matrix+ * Return: final eta+ *+ * Implements the divsteps_n_matrix_var function from the explanation.+ */+static uint64_t secp256k1_modinv64_divsteps_62_var(uint64_t eta, uint64_t f0, uint64_t g0, secp256k1_modinv64_trans2x2 *t) {+    /* inv256[i] = -(2*i+1)^-1 (mod 256) */+    static const uint8_t inv256[128] = {+        0xFF, 0x55, 0x33, 0x49, 0xC7, 0x5D, 0x3B, 0x11, 0x0F, 0xE5, 0xC3, 0x59,+        0xD7, 0xED, 0xCB, 0x21, 0x1F, 0x75, 0x53, 0x69, 0xE7, 0x7D, 0x5B, 0x31,+        0x2F, 0x05, 0xE3, 0x79, 0xF7, 0x0D, 0xEB, 0x41, 0x3F, 0x95, 0x73, 0x89,+        0x07, 0x9D, 0x7B, 0x51, 0x4F, 0x25, 0x03, 0x99, 0x17, 0x2D, 0x0B, 0x61,+        0x5F, 0xB5, 0x93, 0xA9, 0x27, 0xBD, 0x9B, 0x71, 0x6F, 0x45, 0x23, 0xB9,+        0x37, 0x4D, 0x2B, 0x81, 0x7F, 0xD5, 0xB3, 0xC9, 0x47, 0xDD, 0xBB, 0x91,+        0x8F, 0x65, 0x43, 0xD9, 0x57, 0x6D, 0x4B, 0xA1, 0x9F, 0xF5, 0xD3, 0xE9,+        0x67, 0xFD, 0xDB, 0xB1, 0xAF, 0x85, 0x63, 0xF9, 0x77, 0x8D, 0x6B, 0xC1,+        0xBF, 0x15, 0xF3, 0x09, 0x87, 0x1D, 0xFB, 0xD1, 0xCF, 0xA5, 0x83, 0x19,+        0x97, 0xAD, 0x8B, 0xE1, 0xDF, 0x35, 0x13, 0x29, 0xA7, 0x3D, 0x1B, 0xF1,+        0xEF, 0xC5, 0xA3, 0x39, 0xB7, 0xCD, 0xAB, 0x01+    };++    uint64_t u = 1, v = 0, q = 0, r = 1; /* Start with identity matrix */+    uint64_t f = f0, g = g0, m, x, y, z;+    uint32_t w;+    int i = 62, limit, zeros;++    for (;;) {+        /* Use a sentinel bit to count zeros only up to i. */+        zeros = secp256k1_ctz64_var(g | (UINT64_MAX << i));+        /* Perform zeros divsteps at once; they all just divide g by two. */+        g >>= zeros;+        u <<= zeros;+        v <<= zeros;+        eta -= zeros;+        i -= zeros;+        /* We're done once we've done 62 divsteps. */+        if (i == 0) break;+        VERIFY_CHECK((f & 1) == 1);+        VERIFY_CHECK((g & 1) == 1);+        VERIFY_CHECK((u * f0 + v * g0) == f << (62 - i));+        VERIFY_CHECK((q * f0 + r * g0) == g << (62 - i));+        /* If eta is negative, negate it and replace f,g with g,-f. */+        if ((int64_t)eta < 0) {+            eta = -eta;+            x = f; f = g; g = -x;+            y = u; u = q; q = -y;+            z = v; v = r; r = -z;

Done. Changed for a local tmp variable.

sipa

comment created time in 11 hours

issue commentformatjs/formatjs

if no manual explicit id is added: [React Intl] An `id` must be provided to format a message.

Has there been any update on this?

I've tried both solutions updating .babelrc as described in https://formatjs.io/docs/guides/bundler-plugins/ as well as override in config-overrides.js which didn't help so now my only solution is to add the ids manually

mudrz

comment created time in 12 hours

Pull request review commentbitcoin-core/secp256k1

schnorrsig API overhaul

 typedef int (*secp256k1_nonce_function_hardened)(  *  *  If a data pointer is passed, it is assumed to be a pointer to 32 bytes of  *  auxiliary random data as defined in BIP-340. If the data pointer is NULL,- *  schnorrsig_sign does not produce BIP-340 compliant signatures. The algo16- *  argument must be non-NULL, otherwise the function will fail and return 0.- *  The hash will be tagged with algo16 after removing all terminating null- *  bytes. Therefore, to create BIP-340 compliant signatures, algo16 must be set- *  to "BIP0340/nonce\0\0\0"+ *  schnorrsig_sign does not follow the BIP-340 nonce derivation procedure+ *  exactly. The algo16 argument must be non-NULL, otherwise the function will+ *  fail and return 0. The hash will be tagged with algo16 after removing all+ *  terminating null bytes. Therefore, to create BIP-340 compliant signatures,+ *  algo16 must be set to "BIP0340/nonce\0\0\0"

added algolen argument

jonasnick

comment created time in 12 hours

Pull request review commentbitcoin-core/secp256k1

schnorrsig API overhaul

 typedef int (*secp256k1_nonce_function_hardened)(  *  *  If a data pointer is passed, it is assumed to be a pointer to 32 bytes of  *  auxiliary random data as defined in BIP-340. If the data pointer is NULL,- *  schnorrsig_sign does not produce BIP-340 compliant signatures. The algo16- *  argument must be non-NULL, otherwise the function will fail and return 0.- *  The hash will be tagged with algo16 after removing all terminating null- *  bytes. Therefore, to create BIP-340 compliant signatures, algo16 must be set- *  to "BIP0340/nonce\0\0\0"+ *  schnorrsig_sign does not follow the BIP-340 nonce derivation procedure+ *  exactly. The algo16 argument must be non-NULL, otherwise the function will+ *  fail and return 0. The hash will be tagged with algo16 after removing all+ *  terminating null bytes. Therefore, to create BIP-340 compliant signatures,+ *  algo16 must be set to "BIP0340/nonce\0\0\0"  */ SECP256K1_API extern const secp256k1_nonce_function_hardened secp256k1_nonce_function_bip340; +/** Opaque data structure that holds additional arguments for schnorrsig signing.+ */+typedef struct secp256k1_schnorrsig_config_struct secp256k1_schnorrsig_config;+ /** Create a Schnorr signature.  *  *  Does _not_ strictly follow BIP-340 because it does not verify the resulting  *  signature. Instead, you can manually use secp256k1_schnorrsig_verify and  *  abort if it fails.  *- *  Otherwise BIP-340 compliant if the noncefp argument is NULL or- *  secp256k1_nonce_function_bip340 and the ndata argument is 32-byte auxiliary- *  randomness.- *  *  Returns 1 on success, 0 on failure.  *  Args:    ctx: pointer to a context object, initialized for signing (cannot be NULL)  *  Out:   sig64: pointer to a 64-byte array to store the serialized signature (cannot be NULL)- *  In:    msg32: the 32-byte message being signed (cannot be NULL)+ *  In:      msg: the message being signed (cannot be NULL)+ *       msg_len: length of the message  *       keypair: pointer to an initialized keypair (cannot be NULL)- *       noncefp: pointer to a nonce generation function. If NULL, secp256k1_nonce_function_bip340 is used- *         ndata: pointer to arbitrary data used by the nonce generation- *                function (can be NULL). If it is non-NULL and- *                secp256k1_nonce_function_bip340 is used, then ndata must be a- *                pointer to 32-byte auxiliary randomness as per BIP-340.+ *    aux_rand32: 32 bytes of fresh randomness. While recommended to provide+ *                this, it is only supplemental to security and can be NULL. See+ *                BIP-340 for a full explanation of this argument and for+ *                guidance if randomness is expensive.  */ SECP256K1_API int secp256k1_schnorrsig_sign(     const secp256k1_context* ctx,     unsigned char *sig64,-    const unsigned char *msg32,+    const unsigned char *msg,+    size_t msg_len,     const secp256k1_keypair *keypair,+    unsigned char *aux_rand32+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(5);++/** Create a schnorrsig config (in dynamically allocated memory).+ *+ *  This function uses malloc to allocate memory. It is guaranteed that malloc is+ *  called at most once for every call of this function.+ *+ *  The allocated memory must be freed with secp256k1_schnorrsig_config_destroy.+ *+ *  Returns: a newly created schnorrsig config+ *  Args: ctx:  an existing context object (cannot be NULL)+ */+SECP256K1_API secp256k1_schnorrsig_config* secp256k1_schnorrsig_config_create(+    const secp256k1_context* ctx+) SECP256K1_ARG_NONNULL(1);++/** Destroy a schnorrsig config (created in dynamically allocated memory).+ *+ *  The config pointer may not be used afterwards.+ *  Args:  ctx: a secp256k1 context object+ *  In: config: the config to destroy+ */+SECP256K1_API void secp256k1_schnorrsig_config_destroy(+    const secp256k1_context* ctx,+    secp256k1_schnorrsig_config *config+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);++/** Set nonce function pointer and nonce data of a config object+ *+ *  Returns: 1 if the arguments are valid. 0 otherwise+ *  Args:  ctx: a secp256k1 context object+ *  In: config: the config to set the noncefp and ndata for+ *     noncefp: the nonce function pointer to set+ *       ndata: the nonce data to set+ */+SECP256K1_API int secp256k1_schnorrsig_config_set_nonce(+    const secp256k1_context* ctx,+    secp256k1_schnorrsig_config *config,     secp256k1_nonce_function_hardened noncefp,     void *ndata-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);++/** Create a Schnorr signature with a more flexible API.+ *+ *  Same arguments as secp256k1_schnorrsig_sign except that it accepts a pointer+ *  to a config object that allows customizing signing by passing additional+ *  arguments.+ *+ *  In: noncefp: pointer to a nonce generation function. If NULL,+ *               secp256k1_nonce_function_bip340 is used+ *        ndata: pointer to arbitrary data used by the nonce generation function+ *               (can be NULL). If it is non-NULL and+ *               secp256k1_nonce_function_bip340 is used, then ndata must be a+ *               pointer to 32-byte auxiliary randomness as per BIP-340.+ *       config: pointer to a config object.+ */

fixed

jonasnick

comment created time in 12 hours

pull request commentbitcoin-core/secp256k1

WIP: schnorrsig API overhaul

I pushed a new version of this PR with two major change:

  1. The versioned struct for extra sign_custom parameters is removed. Versioned structs are useful for forward compatibility (i.e. application expecting newer library actually calls older library), but it's not clear what to do in case we add sign to contract members to the struct, but the library doesn't understand S2C yet. We can abort, but that's not really forward compatibility. Instead it's a simple struct now with a magic value which can be used to achieve backward compatibility. If we decide to change the struct, we also change the magic which then acts as a version number and allows libsecp to distinguish between different structs.
  2. The schnorrsig_sign function only accepts 32-byte messages again. Also, I added the public secp256k1_tagged_sha256 function to create tagged hashes according to BIP-340. The schnorrsig_sign doc explains that for messages that are not 32 bytes, one should use secp256k1_tagged_sha256 with a domain seperator. schnorrsig_sign_custom still allows truly signing variable length messages. As such, with libsecp both methods for variable length messages can be used, but one is clearly recommended to not confuse users and that's the one that currently has the most adoption (Taproot, DLCs, Lightning offers). And the additional tag argument to secp256k1_tagged_sha256 makes it harder to miss domain separation.

I also added tests and docs. Since this PR doesn't contradict the discussed BIP-340 changes, I removed the WIP status.

jonasnick

comment created time in 12 hours

issue closedarguman/arguman.org

naber

fatih naber nerelerdesin

closed time in 13 hours

midorikocak

issue commentbitcoin-core/secp256k1

UB in tests: Invalid pointer comparison in secp256k1_fe_inv_all_var

I believe that means that overlap can be checked by casting to intptr_t and doing the check we do now. It would rely on the assumption that subsequent array elements correspond to subsequent intptr_t values, which I expect to be universal, and even if not, wouldn't be UB.

Ugh, yeah, I guess we can do this. I didn't expect that a pointer-to-int cast will ever "solve" a problem.

By the way, I usually look stuff up in the standard directly: https://port70.net/~nsz/c/c89/c89-draft.html#3.3.8

subsequent intptr_t values, which I expect to be universal,

It's not necessarily true on platforms with segmented memory e.g. real-mode 16-bit dos. But I don't think that's a problem, because this is just a verify check. It's probably also not true for some bizarre environments like the compcert formalism for C. But again, no problem there.

If there were come libsecp256k1 porting guide it might deserve a line in it.

Well, the current behavior isn't universal either. I guess we should add a comment to the line, and if we want we can also add a comment to assumptions.h. This is the closest thing to a porting guide that we currently have.

practicalswift

comment created time in 13 hours

issue commentbitcoin-core/secp256k1

No declaration for `secp256k1_xonly_pubkey_load`.

Similarly secp256k1_pubkey_load is used in modules/extrakeys/main_impl.h but there is no declaration for it.

roconnor-blockstream

comment created time in 16 hours

issue commentbitcoin-core/secp256k1

UB in tests: Invalid pointer comparison in secp256k1_fe_inv_all_var

subsequent intptr_t values, which I expect to be universal, and even if not, wouldn't be UB.

It's not true on platforms with segmented memory e.g. real-mode 16-bit dos. But I don't think that's a problem, because this is just a verify check. It's probably also not true for some bizarre environments like the compcert formalism for C. But again, no problem there.

If there were come libsecp256k1 porting guide it might deserve a line in it.

practicalswift

comment created time in 16 hours

issue commentformatjs/formatjs

[formatjs extract] Multiple source locations get lost

Yeah sgtm we can bump major

hjylewis

comment created time in 17 hours

issue commentformatjs/formatjs

[formatjs extract] Multiple source locations get lost

Cool, I can work on a PR for this.

Currently when extract-source-location=true we output something like this:

{
  "trailing.ws": {
    "col": 21,
    "defaultMessage": "Some whitespace",
    "description": "Whitespace",
    "end": 650,
    "file": "defineMessages/actual.js",
    "line": 20,
    "start": 545,
  }
}

Instead, should we output something like this?

{
  "trailing.ws": {
    "defaultMessage": "Some whitespace",
    "description": "Whitespace",
    "locations": [
      {
        "col": 21,
        "end": 650,
        "file": "defineMessages/actual.js",
        "line": 20,
        "start": 545,
      }
    ]
  }
}

This seems like it would be the correct API. It would be a breaking change.

hjylewis

comment created time in 17 hours

issue commentbitcoin-core/secp256k1

UB in tests: Invalid pointer comparison in secp256k1_fe_inv_all_var

So after reading a bit on cppreference.com (which also has pages about C), I believe:

  • == and != on between unrelated pointers is implementation defined
  • < <= > >= between unrelated pointers is UB.
  • casting from pointer to a sufficiently large integer type is implementation defined, but reversible (casting the integer back to the original pointer type gives a pointer to the original object)

I believe that means that overlap can be checked by casting to intptr_t and doing the check we do now. It would rely on the assumption that subsequent array elements correspond to subsequent intptr_t values, which I expect to be universal, and even if not, wouldn't be UB.

practicalswift

comment created time in 17 hours

issue commentformatjs/formatjs

Support multiline template literals

I could be mistaken but it looks like ts-transformer replaces those spaces with a single space.

I just checked and react-intl does the same thing with defaultMessage at runtime though I can't find where in the source code that's happening.

hjylewis

comment created time in 18 hours

delete branch formatjs/formatjs

delete branch : dependabot/npm_and_yarn/webpack-5.16.0

delete time in 18 hours

PR closed formatjs/formatjs

chore(deps-dev): bump webpack from 4.46.0 to 5.16.0 dependencies javascript

Bumps webpack from 4.46.0 to 5.16.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack/webpack/releases">webpack's releases</a>.</em></p> <blockquote> <h2>v5.16.0</h2> <h1>Features</h1> <ul> <li>add <code>webpack_is_included("./some-module")</code> which returns true when the module is bundled and false when not</li> <li>priorize eager shared modules over normal shared modules (with the same version), as they are loaded anyway</li> <li>add <code>library.type: "assign-properties"</code> which merges all exports into a global variable</li> <li>allow <code>optimization.innerGraph</code> for <code>new URL()</code> <ul> <li>This allows to detect which URLs are used and drop the module and asset when they are not.</li> </ul> </li> </ul> <h1>Bugfixes</h1> <ul> <li>only return exports from runtime when needed <ul> <li>This allows to use <code>experiments.outputModule: true</code> with <code>optimization.runtimeChunk</code></li> </ul> </li> <li>fix a bug that <code>splitChunk.reuseExistingChunk</code> doesn't work for entrypoints <ul> <li>This optimized an edge case where a nearly empty entrypoint is created when an entrypoint contains only vendor modules</li> </ul> </li> </ul> <h1>Developer Experience</h1> <ul> <li>include plugin names in deprecation message for "NormalModuleFactory.xxx is no longer a waterfall hook"</li> <li>improve error message when passing an invalid library name</li> </ul> <h2>v5.15.0</h2> <h1>Features</h1> <ul> <li>add <code>getResolve</code> method to data object when using function <code>externals</code></li> <li><code>externals</code> function may return a promise now</li> </ul> <h1>Bugfixes</h1> <ul> <li>fix <code>define("local-module", expr)</code> generating invalid syntax</li> <li>fix resolving bug when resolving build dependencies</li> <li>add <code>chunkModulesSpace</code> to schema</li> <li>fix <code>rebuildModule</code> api</li> </ul> <h1>Performance</h1> <ul> <li>improve performance of build dependencies resolving</li> </ul> <h2>v5.14.0</h2> <h1>Features</h1> <ul> <li>add experimental ESM tracking for build dependencies</li> </ul> <h1>Bugfixes</h1> <ul> <li>fix crash when calling <code>watcher.getContextTimeInfoEntries()</code></li> <li>make filesystem types compatible with <code>memfs</code> and real <code>fs</code></li> <li>fix rebuild error when using the <code>AutomaticPrefetchPlugin</code></li> </ul> <h1>Contribution</h1> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/webpack/webpack/commit/56246f0833333a8e277386b16408d8a3eeff553e"><code>56246f0</code></a> 5.16.0</li> <li><a href="https://github.com/webpack/webpack/commit/8d2c2f44c5187aa2acc31f5a99ab889a825e0ed4"><code>8d2c2f4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12453">#12453</a> from webpack/bugfix/reuse-vendor-entry</li> <li><a href="https://github.com/webpack/webpack/commit/8dc85ae29533a3d571a5297f53bd26f4581f20e4"><code>8dc85ae</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12432">#12432</a> from webpack/dependabot/npm_and_yarn/husky-4.3.8</li> <li><a href="https://github.com/webpack/webpack/commit/76d28de82dbcb762b4007fcae82e0a00e6bba8f1"><code>76d28de</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12424">#12424</a> from webpack/dependabot/npm_and_yarn/types/node-14....</li> <li><a href="https://github.com/webpack/webpack/commit/7ee3f25033af3bd6f397634c929e60dc983219cf"><code>7ee3f25</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12448">#12448</a> from webpack/dependabot/npm_and_yarn/core-js-3.8.3</li> <li><a href="https://github.com/webpack/webpack/commit/2752f6c80a07afada5eafcef026381beed05ddd7"><code>2752f6c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12451">#12451</a> from webpack/bugfix/tree-shake-url</li> <li><a href="https://github.com/webpack/webpack/commit/2b3489d13600583ec8a606e10f80971ae0c4fe4d"><code>2b3489d</code></a> reuseExistingChunk is able to reuse an entry chunk when it's the only selecte...</li> <li><a href="https://github.com/webpack/webpack/commit/4ec418c8ee4f1c1ed8513d87065bd62a88b0b067"><code>4ec418c</code></a> allow inner graph shaking for new URL()</li> <li><a href="https://github.com/webpack/webpack/commit/4aa650da925467048e5e24cc79a6d016068c149f"><code>4aa650d</code></a> chore(deps-dev): bump core-js from 3.8.2 to 3.8.3</li> <li><a href="https://github.com/webpack/webpack/commit/8918ab1377876cb7948cf433915560fd139506ad"><code>8918ab1</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12431">#12431</a> from webpack/dependabot/npm_and_yarn/eslint-7.18.0</li> <li>Additional commits viewable in <a href="https://github.com/webpack/webpack/compare/v4.46.0...v5.16.0">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+240 -8

1 comment

2 changed files

dependabot[bot]

pr closed time in 18 hours

pull request commentformatjs/formatjs

chore(deps-dev): bump webpack from 4.46.0 to 5.16.0

Superseded by #2530.

dependabot[bot]

comment created time in 18 hours

create barnchformatjs/formatjs

branch : dependabot/npm_and_yarn/webpack-5.17.0

created branch time in 18 hours

PR opened formatjs/formatjs

chore(deps-dev): bump webpack from 4.46.0 to 5.17.0

Bumps webpack from 4.46.0 to 5.17.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/webpack/webpack/releases">webpack's releases</a>.</em></p> <blockquote> <h2>v5.17.0</h2> <h1>Features</h1> <ul> <li>add experimental lazy compilation via <code>experiments.lazyCompilation: true</code> for web and node targets <ul> <li>compiles entrypoints and <code>import()</code>s only when they are accessed</li> <li>More details see: <a href="https://github-redirect.dependabot.com/webpack/webpack/pull/12469">webpack/webpack#12469</a></li> <li>Known issues: <code>webpack-dev-server</code>/<code>webpack serve</code> opening an entrypoint for the first time, sometimes need a manual refresh.</li> </ul> </li> <li>move some javascript parsing related configuration options from <code>module</code> to <code>module.parser.javascript</code> and also allow to set them via <code>module.rules</code></li> <li>add <code>module.parser.javascript.commonjsMagicComments</code> to enable <code>/* webpackIgnore: true */</code> for <code>require()</code> calls</li> </ul> <h1>Bugfixes</h1> <ul> <li>fix a problem with <code>webpack.debug.ProfilingPlugin</code> on Mac when the computer was suspended before.</li> <li>fix a bug with IIFE handling when the IIFE has parameters with default values</li> </ul> <h2>v5.16.0</h2> <h1>Features</h1> <ul> <li>add <code>webpack_is_included("./some-module")</code> which returns true when the module is bundled and false when not</li> <li>priorize eager shared modules over normal shared modules (with the same version), as they are loaded anyway</li> <li>add <code>library.type: "assign-properties"</code> which merges all exports into a global variable</li> <li>allow <code>optimization.innerGraph</code> for <code>new URL()</code> <ul> <li>This allows to detect which URLs are used and drop the module and asset when they are not.</li> </ul> </li> </ul> <h1>Bugfixes</h1> <ul> <li>only return exports from runtime when needed <ul> <li>This allows to use <code>experiments.outputModule: true</code> with <code>optimization.runtimeChunk</code></li> </ul> </li> <li>fix a bug that <code>splitChunk.reuseExistingChunk</code> doesn't work for entrypoints <ul> <li>This optimized an edge case where a nearly empty entrypoint is created when an entrypoint contains only vendor modules</li> </ul> </li> </ul> <h1>Developer Experience</h1> <ul> <li>include plugin names in deprecation message for "NormalModuleFactory.xxx is no longer a waterfall hook"</li> <li>improve error message when passing an invalid library name</li> </ul> <h2>v5.15.0</h2> <h1>Features</h1> <ul> <li>add <code>getResolve</code> method to data object when using function <code>externals</code></li> <li><code>externals</code> function may return a promise now</li> </ul> <h1>Bugfixes</h1> <ul> <li>fix <code>define("local-module", expr)</code> generating invalid syntax</li> <li>fix resolving bug when resolving build dependencies</li> <li>add <code>chunkModulesSpace</code> to schema</li> <li>fix <code>rebuildModule</code> api</li> </ul> <h1>Performance</h1> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/webpack/webpack/commit/d02e8daa267ca094fc0a030a595b000d35a99493"><code>d02e8da</code></a> 5.17.0</li> <li><a href="https://github.com/webpack/webpack/commit/64fb5f33f7b242fdbe8da453f793dbf95f4699e8"><code>64fb5f3</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12469">#12469</a> from webpack/feature/async-compilation</li> <li><a href="https://github.com/webpack/webpack/commit/f4297099b7315b83e75ed3c3879277e18c1796ad"><code>f429709</code></a> fix symlink setup step</li> <li><a href="https://github.com/webpack/webpack/commit/c4d41ffa55668680d4ae3182badfaa589d32f663"><code>c4d41ff</code></a> nitpicks for tests</li> <li><a href="https://github.com/webpack/webpack/commit/100317556ebc27b34c8eddc4174dba2efa247458"><code>1003175</code></a> add lazy compilation for entrypoints</li> <li><a href="https://github.com/webpack/webpack/commit/988cf8d47a07eaa91f1bac48741e2c22b9aa9f84"><code>988cf8d</code></a> improve error handling</li> <li><a href="https://github.com/webpack/webpack/commit/a1515fa9f0f6cea020eebf91a9845a2f956697fa"><code>a1515fa</code></a> add experimental lazy compilation</li> <li><a href="https://github.com/webpack/webpack/commit/287707ce4d40dff2f03f29f3f93a8148676f6f09"><code>287707c</code></a> fix merge issue</li> <li><a href="https://github.com/webpack/webpack/commit/a07a1269f0a0b23d40de6c9565eeaf962fbc8904"><code>a07a126</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/11316">#11316</a> from petermetz/master</li> <li><a href="https://github.com/webpack/webpack/commit/f85f0d5bafb54ff1f50c52483856f8ca13beae6e"><code>f85f0d5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/webpack/issues/12452">#12452</a> from webpack/bugfix/12044</li> <li>Additional commits viewable in <a href="https://github.com/webpack/webpack/compare/v4.46.0...v5.17.0">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+236 -9

0 comment

2 changed files

pr created time in 18 hours

issue commentformatjs/formatjs

Add support for the "integer-width" stem to formatted numbers

Thanks for reporting! We'll take a look asap.

nickiaconis

comment created time in 18 hours

issue commentformatjs/formatjs

[formatjs extract] Multiple source locations get lost

hmm yeah we can support this & ofc PR's always welcome :)

hjylewis

comment created time in 18 hours

push eventformatjs/formatjs

Long Ho

commit sha 0915dfb954c0428c0ebdfc51c909a492a185df1f

build: publish - @formatjs/cli@3.0.2 - eslint-plugin-formatjs@2.10.4

view details

push time in 18 hours

created tagformatjs/formatjs

tag@formatjs/cli@3.0.2

The monorepo home to all of the FormatJS related libraries, most notably react-intl.

created time in 18 hours

created tagformatjs/formatjs

tageslint-plugin-formatjs@2.10.4

The monorepo home to all of the FormatJS related libraries, most notably react-intl.

created time in 18 hours

more