go-ethereum/mobile
Felix Lange d258e4cf2a all: run RPC APIs on top of the stable Go API
In this commit, the RPC API is adapted to run on top of the new Go API.
This required lots of changes to many packages, but has a few side
benefits:

- Ethereum and LightEthereum can now be used as a contract backend.
- Some duplicated code could be removed (there is added duplication in
  other places though)
- It is now much easier to see which operations are unsupported with the
  light client. Package les previously relied on the full node RPC API
  backend, which masked several issues because the RPC API performed
  direct access to the chain database.

Changes to packages in detail:

accounts/abi/bind:
  - Contract call boilerplate has moved to package core.

cmd/utils:
  - les now inherits the event.TypeMux from the Node instance

contracts/release:
  - The ReleaseService now uses Ethereum and LightEthereum as backend.

core:
  - MissingNumber is exposed so it can be used in package eth.
  - GetTransaction now returns the index as an int, for convenience
    reasons.
  - ApplyCallMessage has been added as the new one and only
    implementation of read-only contract calls.
  - TxPool exposes NonceAt instead of the more general accessor for the
    ManagedState.

core/types:
  - Signer.SignECDSA is gone (it was basically unused).
  - WithSignature doesn't return an error anymore (all implementations panic for
    invalid length). I made this change to avoid code duplication in the API.

eth:
  - EthApiBackend is gone. In its place, Ethereum gains many new methods
    which implement a large portion of the new Go API. It does not
    yet support event subscriptions and log filtering.
  - Some accessors for internal objects are gone.
  - ethapi.PrivateDebugAPI and ethapi.TxPoolDebugAPI are now created in
    package eth for dependency reasons.

eth/downloader:
  - Progress returns a pointer to simplify callers.

eth/filters:
  - The Backend interface is simpler and uses the stable Go API where
    possible. The new BlockReceipts method saves one DB read because
    BlockReceipts also takes a block number argument.
  - ChainDB is no longer passed via the Backend interface.
  - EventSystem now relies on HeaderByHash for reorgs in light client mode
    instead of reading from the chain database.

eth/gasprice:
  - The LightPriceOracle now uses ethereum.ChainReader instead of
    ethapi.Backend.

ethclient:
  - TransactionByHash is adapted for the last-minute API change which
    adds the isPending return value.

internal/ethapi:
  - PublicTxPoolAPI is now called TxPoolDebugAPI, moved to its own file
    and talks to the transaction pool instead of using the main Backend.
  - The API no longer accesses the chain database directly. All access
    is mediated through Backend methods.
  - The backend is now split into three interfaces.
    Implementing Backend is mandatory but does not require the pending
    state. The other two (PendingState, TransactionInclusionBlock) are
    optional and discovered at runtime.

les:
  - LesApiBackend is gone, LightEthereum gets all the methods.
  - Weird accessors copied from package eth are now gone as well.

light:
  - TxPool.Stats now returns a queued count of zero. It implements the
    ethapi.TxPool interface and can be used with TxPoolDebugAPI.
2016-11-23 23:45:20 +01:00
..
accounts.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
android_test.go accounts/abi/bind, mobile: review fixes and android tests 2016-11-14 18:00:14 +02:00
big.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
big_go1.7.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
bind.go mobile: port wrappers to EIP155 and EIP158 fork 2016-11-14 18:00:14 +02:00
common.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
context.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
discover.go cmd/utils, mobile: place bootnodes in LGPL packages 2016-11-14 18:00:14 +02:00
doc.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
ethclient.go all: run RPC APIs on top of the stable Go API 2016-11-23 23:45:20 +01:00
ethereum.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
geth.go cmd/geth, core, light, mobile: removed state account StartingNonce 2016-11-23 09:34:01 +01:00
geth_android.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
geth_ios.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
geth_other.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
init.go travis, build: cocoapods build fixes and travis caches 2016-11-14 18:00:14 +02:00
interface.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
p2p.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
params.go core: implemented new ropsten testnet 2016-11-23 09:34:01 +01:00
primitives.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00
types.go all: run RPC APIs on top of the stable Go API 2016-11-23 23:45:20 +01:00
vm.go mobile: initial wrappers for mobile support 2016-11-14 17:56:58 +02:00