Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: holiman/uint256
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.1
Choose a base ref
...
head repository: holiman/uint256
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.2
Choose a head ref
  • 9 commits
  • 11 files changed
  • 7 contributors

Commits on Dec 29, 2022

  1. optimize AddMod where modulus is 4-limbs wide and x/y highest limb is…

    … less than or equal to modulus highest limb (#120)
    
    * optimize AddMod where modulus is 4-limbs wide and x/y highest limb is lte modulus highest limb
    
    * gofmt
    jwasinger authored Dec 29, 2022
    Configuration menu
    Copy the full SHA
    9c4de98 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. String conversion from decimal (#108) (#122)

    This change adds various string-conversion methods, mainly from decimal. 
    It also aligns some setters, into the following: 
    
    Public "convenience" constructors
        FromBig(*big.Int)
        FromHex(string)
        FromBase10(string)
    Instance setters:
        (z *Int) SetFromBase10(string) (possibly)
        (z *Int) SetFromBig(*big.Int)
        (z *Int) SetBytes([]byte)
        (z *Int) SetString(string, int)
    
    
    Co-authored-by: a <[email protected]>
    Co-authored-by: Tjudice <[email protected]>
    Co-authored-by: Martin Holst Swende <[email protected]>
    4 people authored Feb 8, 2023
    Configuration menu
    Copy the full SHA
    c6c6f8d View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. Configuration menu
    Copy the full SHA
    557480c View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2023

  1. uint256: fix minor nits (#125)

    Remove some complains from deepsource, no functional changes
    holiman authored Feb 19, 2023
    Configuration menu
    Copy the full SHA
    89e7a3b View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. uint256: implement fastssz marshaling interfaces (#126)

    Adds support for using uint256 in ssz contexts, by implementing the fastssz Marshaler interface. 
    
    ---------
    
    Co-authored-by: Martin Holst Swende <[email protected]>
    karalabe and holiman authored Mar 9, 2023
    Configuration menu
    Copy the full SHA
    146987f View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. conversion: optimize Scan() scientific scanning (#127)

    This change optimizes the Scan method, by making utilizing seek instead of string-split, adds some test and makes the function alloc-free. 
    
    ---------
    
    Co-authored-by: Martin Holst Swende <[email protected]>
    elee1766 and holiman authored Mar 16, 2023
    Configuration menu
    Copy the full SHA
    c385c61 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. add MustFromBig for nicer struct initialization (#128)

    Add support for MustFromBig for nicer struct initialization. MustFromBig panics if the conversion overflows.
    karalabe authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    87b9142 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. conversion: add PrettyDec, optimize Dec, add benchmarks and fuzzi…

    …ng (#130)
    
    This PR implements the Dec method 'natively', and adds the API-method PrettyDec.
    
    	// Dec returns the decimal representation of z.
    	func (z *Int) Dec() string
    	
    	// PrettyDec returns the decimal representation of z, with thousands-separators.
    	func (z *Int) PrettyDec(separator byte) string
    
    It also adds benchmarks and a new fuzz-test for the changed methods.
    holiman authored Mar 22, 2023
    Configuration menu
    Copy the full SHA
    01ef9cd View commit details
    Browse the repository at this point in the history
  2. implement MustFromHex, MustFromDecimal (#131)

    The PR #128 added MustFromBig, this PR adds two similar helpers: MustFromHex and MustFromDecimal.
    
    	// MustFromHex is a convenience-constructor to create an Int from
    	// a hexadecimal string.
    	// Returns a new Int and panics if any error occurred.
    	func MustFromHex(hex string) *Int
    	
    	// MustFromDecimal is a convenience-constructor to create an Int from a
    	// decimal (base 10) string.
    	// Returns a new Int and panics if any error occurred.
    	func MustFromDecimal(decimal string) *Int
    holiman authored Mar 22, 2023
    Configuration menu
    Copy the full SHA
    29b48c8 View commit details
    Browse the repository at this point in the history
Loading