Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct multiple typos around files #408

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion config/common/gas-price-cap-time-of-day-multipliers.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
# Time of day multipliers for dynamic gas price cap calculation:
#
# TDM stands for "Time of Day Mutliplier" and has a range of values between 0.25 - 1.75.
# TDM stands for "Time of Day Multiplier" and has a range of values between 0.25 - 1.75.
#
# When we expect the L1 gas price to be low, for example on a Saturday night, the TDM will be at it's highest because
# we want to increase the rate at which we increase the threshold to try and settle within this time window.
Expand Down
2 changes: 1 addition & 1 deletion prover/maths/common/vector/vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func Add(res, a, b []field.Element, extras ...[]field.Element) {
}
}

// Sub substracts two vectors `a` and `b` and put the result in `res`
// Sub subtracts two vectors `a` and `b` and put the result in `res`
// `res` must be pre-allocated by the caller and res, a and b must all have
// the same size.
// res == a or res == b or both is valid assignment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (ctx mptsCtx) accumulateQuotients(run *wizard.ProverRuntime) {
}

/*
Substract by the lagrange interpolator and get the quotient
Subtract by the lagrange interpolator and get the quotient
*/
for j, hpos := range ctx.xPoly[polHandle.GetColID()] {
var lagrange sv.SmartVector = sv.NewRegular(lagranges[hpos])
Expand Down
14 changes: 7 additions & 7 deletions prover/symbolic/constructor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,31 @@ func TestConstructor(t *testing.T) {
Actual: a.Sub(b),
ExpectedOperator: LinComb{Coeffs: []int{1, -1}},
ExpectedParent: []*Expression{b, a},
Explainer: "Normally substracting two variables should create a LinComb object",
Explainer: "Normally subtracting two variables should create a LinComb object",
},
{
Actual: a.Sub(zero),
ExpectedOperator: a.Operator,
ExpectedParent: []*Expression{},
Explainer: "When substracting zero, this should be simplified into a no-op",
Explainer: "When subtracting zero, this should be simplified into a no-op",
},
{
Actual: a.Sub(a),
ExpectedOperator: zero.Operator,
ExpectedParent: []*Expression{},
Explainer: "When substracting a with itself, this should be simplified into zero",
Explainer: "When subtracting a with itself, this should be simplified into zero",
},
{
Actual: a.Sub(one).Sub(one),
ExpectedOperator: LinComb{Coeffs: []int{1, 1}},
ExpectedParent: []*Expression{a, NewConstant(-2)},
Explainer: "When substracting twice by a constant, this should be simplified into LinComb with only `1` as coeffs",
Explainer: "When subtracting twice by a constant, this should be simplified into LinComb with only `1` as coeffs",
},
{
Actual: a.Sub(b).Sub(c),
ExpectedOperator: LinComb{Coeffs: []int{1, -1, -1}},
ExpectedParent: []*Expression{a, b, c},
Explainer: "When substracting a with b then c, this should be regrouped into a single linear combination",
Explainer: "When subtracting a with b then c, this should be regrouped into a single linear combination",
},
{
Actual: a.Mul(b),
Expand Down Expand Up @@ -153,12 +153,12 @@ func TestImmutableConstructors(t *testing.T) {
{
Actual: Sub(a, b, 1),
Expected: aVar.Sub(bVar).Sub(one),
Explainer: "Substracting two metadata and a constant",
Explainer: "Subtracting two metadata and a constant",
},
{
Actual: Sub(aVar, bVar, c),
Expected: aVar.Sub(bVar).Sub(cVar),
Explainer: "Substracting two expressions and a metadata",
Explainer: "Subtracting two expressions and a metadata",
},
{
Actual: Mul(a, b, 1),
Expand Down
2 changes: 1 addition & 1 deletion prover/symbolic/constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (expr *Expression) Neg() *Expression {
}

/*
Substract two expressions
Subtract two expressions

Deprecated: Use [Sub] instead of this function as it will be made private.
*/
Expand Down
2 changes: 1 addition & 1 deletion prover/symbolic/evaluation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func ExpressionContainingAllCases() *Expression {
expr = expr.Add(c.Add(b))
expr = expr.Add(c.Add(c))

// Substraction
// Subtraction
expr = expr.Add(a.Sub(a))
expr = expr.Add(a.Sub(b))
expr = expr.Add(a.Sub(c))
Expand Down
4 changes: 2 additions & 2 deletions prover/symbolic/expression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func TestLCConstruction(t *testing.T) {

{
/*
Adding y then substracting x should give back (y)
Adding y then subtracting x should give back (y)
*/
expr1 := x.Add(y).Sub(x)
require.Equal(t, expr1, y)
Expand Down Expand Up @@ -149,7 +149,7 @@ func TestProductConstruction(t *testing.T) {

{
/*
Adding y then substracting x should give back (y)
Adding y then subtracting x should give back (y)
*/
expr1 := x.Mul(y).Mul(x)
require.Equal(t, 2, len(expr1.Children))
Expand Down
2 changes: 1 addition & 1 deletion prover/symbolic/simplify/cost_stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func evaluateNodeCosts(nodes ...sym.Node) (s costStats) {
// The technique here is to to use addition for small
// coefficients because this is a faster than multiplying
// in a field element. We do that up to 2 and -2. The
// second assumption is that addition and substraction
// second assumption is that addition and subtraction
// are equivalent in term of runtime. Otherwise, this is
// done with a multiplication and an addition.

Expand Down
2 changes: 1 addition & 1 deletion sdk/src/core/utils/__tests__/shared.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isEmptyBytes, isNull, isString, isUndefined, subtractSeconds } from "..

describe("Shared utils", () => {
describe("subtractSeconds", () => {
it("should substract X seconds to the current date", () => {
it("should subtract X seconds to the current date", () => {
const currentDate = new Date("2024-04-08T00:12:10.000Z");
expect(subtractSeconds(currentDate, 10)).toStrictEqual(new Date("2024-04-08T00:12:00.000Z"));
});
Expand Down