1. 09 11月, 2016 1 次提交
  2. 04 11月, 2016 1 次提交
  3. 29 10月, 2016 1 次提交
    • B
      internal/ethapi: add personal_sign and fix eth_sign to hash message (#2940) · b59c8399
      bas-vk 提交于
      This commit includes several API changes:
      
      - The behavior of eth_sign is changed. It now accepts an arbitrary
        message, prepends the well-known string
      
              \x19Ethereum Signed Message:\n<length of message>
      
        hashes the result using keccak256 and calculates the signature of
        the hash. This breaks backwards compatability!
        
      - personal_sign(hash, address [, password]) is added. It has the same
        semantics as eth_sign but also accepts a password. The private key
        used to sign the hash is temporarily unlocked in the scope of the
        request.
        
      - personal_recover(message, signature) is added and returns the
        address for the account that created a signature.
      b59c8399
  4. 06 10月, 2016 1 次提交
    • F
      core/state: implement reverts by journaling all changes · 1f1ea18b
      Felix Lange 提交于
      This commit replaces the deep-copy based state revert mechanism with a
      linear complexity journal. This commit also hides several internal
      StateDB methods to limit the number of ways in which calling code can
      use the journal incorrectly.
      
      As usual consultation and bug fixes to the initial implementation were
      provided by @karalabe, @obscuren and @Arachnid. Thank you!
      1f1ea18b
  5. 28 9月, 2016 1 次提交
  6. 26 9月, 2016 2 次提交
  7. 23 8月, 2016 1 次提交
    • F
      accounts/abi/bind: add utilities for waiting on transactions · c97df052
      Felix Lange 提交于
      The need for these functions comes up in code that actually deploys and
      uses contracts. As of this commit, they can be used with both
      SimulatedBackend and ethclient.
      
      SimulatedBackend gains some additional methods in the process and is now
      safe for concurrent use.
      c97df052
  8. 22 8月, 2016 1 次提交
    • F
      accounts/abi/bind: use ethereum interfaces · d62d5fe5
      Felix Lange 提交于
      In this commit, contract bindings and their backend start using the
      Ethereum Go API interfaces offered by ethclient. This makes ethclient a
      suitable replacement for the old remote backend and gets us one step
      closer to the final stable Go API that is planned for go-ethereum 1.5.
      
      The changes in detail:
      
      * Pending state is optional for read only contract bindings.
        BoundContract attempts to discover the Pending* methods via an
        interface assertion. There are a couple of advantages to this:
        ContractCaller is just two methods and can be implemented on top of
        pretty much anything that provides Ethereum data. Since the backend
        interfaces are now disjoint, ContractBackend can simply be declared as
        a union of the reader and writer side.
      
      * Caching of HasCode is removed. The caching could go wrong in case of
        chain reorganisations and removing it simplifies the code a lot.
        We'll figure out a performant way of providing ErrNoCode before the
        1.5 release.
      
      * BoundContract now ensures that the backend receives a non-nil context
        with every call.
      d62d5fe5
  9. 21 8月, 2016 1 次提交
    • F
      accounts/abi/bind/backends: remove nil and remote backends · 056f15aa
      Felix Lange 提交于
      The remote backend is superseded by ethclient.
      
      The nil backend's stated purpose was to enable testing of
      accounts/abi/bind. None of its methods actually worked. A much simpler
      way to get a crashing backend is to simply pass nil as the backend. With
      a one-line change to the generator (removing two explicit interface
      assertions), passing nil actually works.
      
      Removing these backends means that less changes are required later.
      056f15aa
  10. 17 8月, 2016 1 次提交
    • F
      cmd/utils, node: create account manager in package node · 312263c7
      Felix Lange 提交于
      The account manager was previously created by packge cmd/utils as part
      of flag processing and then passed down into eth.Ethereum through its
      config struct. Since we are starting to create nodes which do not have
      eth.Ethereum as a registered service, the code was rearranged to
      register the account manager as its own service. Making it a service is
      ugly though and it doesn't really fix the root cause: creating nodes
      without eth.Ethereum requires duplicating lots of code.
      
      This commit splits utils.MakeSystemNode into three functions, making
      creation of other node/service configurations easier. It also moves the
      account manager into Node so it can be used by those configurations
      without requiring package eth.
      312263c7
  11. 23 7月, 2016 1 次提交
  12. 15 7月, 2016 1 次提交
  13. 11 7月, 2016 1 次提交
  14. 16 6月, 2016 1 次提交
  15. 10 6月, 2016 1 次提交
  16. 06 6月, 2016 1 次提交
    • T
      accounts/abi: Negative numbers not properly converted in ABI encoding · 89c6c5bb
      Thomas Bocek 提交于
      When converting a negative number e.g., -2, the resulting ABI encoding
      should look as follows:
      fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe.
      However, since the check of the type is for an uint instead of an
      int, it results in the following ABI encoding:
      0101010101010101010101010101010101010101010101010101010101010102. The
      Ethereum ABI
      (https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) says,
      that signed integers are stored in two's complement which should be
      of the form ffffff.... and not 01010101..... for e.g. -1. Thus, I
      removed the type check in numbers.go as well as the function S256
      as I don't think they are correct. Or maybe I'm missing something?
      89c6c5bb
  17. 20 5月, 2016 2 次提交
  18. 12 5月, 2016 2 次提交
  19. 11 5月, 2016 1 次提交
    • J
      accounts/abi: fixed unpacking in to already slice interfaces · 91a7a4a7
      Jeffrey Wilcke 提交于
      Previously it was assumed that wheneven type `[]interface{}` was given
      that the interface was empty. The abigen rightfully assumed that
      interface slices which already have pre-allocated variable sets to be
      assigned.
      
      This PR fixes that by checking that the given `[]interface{}` is larger
      than zero and assigns each value using the generic `set` function (this
      function has also been moved to abi/reflect.go) and checks whether the
      assignment was possible.
      
      The generic assignment function `set` now also deals with pointers
      (useful for interface slice mentioned above) by dereferencing the
      pointer until it finds a setable type.
      91a7a4a7
  20. 02 5月, 2016 1 次提交
  21. 28 4月, 2016 4 次提交
  22. 27 4月, 2016 1 次提交
  23. 25 4月, 2016 1 次提交
  24. 20 4月, 2016 1 次提交
    • J
      accouns/abi: refactored ABI package · 5127ec10
      Jeffrey Wilcke 提交于
      Refactored the abi package parsing and type handling. Relying mostly on
      package reflect as opposed to most of our own type reflection. Our own
      type reflection is still used however for cases such as Bytes and
      FixedBytes (abi: bytes•).
      
      This also inclused several fixes for slice handling of arbitrary and
      fixed size for all supported types.
      
      This also further removes implicit type casting such as assigning,
      for example `[2]T{} = []T{1}` will fail, however `[2]T{} == []T{1, 2}`
      (notice assigning *slice* to fixed size *array*). Assigning arrays to
      slices will always succeed if they are of the same element type.
      
      Incidentally also fixes #2379
      5127ec10
  25. 15 4月, 2016 3 次提交
  26. 13 4月, 2016 1 次提交
  27. 12 4月, 2016 6 次提交