aboutsummaryrefslogtreecommitdiffstats
path: root/eth/filters
Commit message (Collapse)AuthorAgeFilesLines
* eth/filters: make filterLogs func more readable (#16920)knarfeh2018-06-141-3/+3
|
* core, eth: minor txpool event cleanupsPéter Szilágyi2018-05-184-13/+13
|
* all: collate new transaction events togetherrjl4934564422018-05-184-28/+33
|
* all: get rid of error when creating memory database (#16716)gary rong2018-05-091-6/+6
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* eth/filter: check nil pointer when unsubscribe (#16682)gary rong2018-05-091-41/+58
| | | | | | | | | | * eth/filter: check nil pointer when unsubscribe * eth/filters, accounts, rpc: abort system if subscribe failed * eth/filter: add crit log before exit * eth/filter, event: minor fixes
* eth/filters: derive FilterCriteria from ethereum.FilterQuery (#16629)Domino Valdano2018-05-081-8/+2
|
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-074-49/+51
|
* common: delete StringToAddress, StringToHash (#16436)Felix Lange2018-04-101-2/+2
| | | | | | | | | | * common: delete StringToAddress, StringToHash These functions are confusing because they don't parse hex, but use the bytes of the string. This change removes them, replacing all uses of StringToAddress(s) by BytesToAddress([]byte(s)). * eth/filters: remove incorrect use of common.BytesToAddress
* eth: fix typos (#16414)Yusup2018-04-041-1/+1
|
* eth, les, light: filter on logs only, derive receipts on demandPéter Szilágyi2018-02-233-8/+48
|
* accounts/abi/bind: support event filtering in abigenPéter Szilágyi2018-01-243-16/+21
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-032-10/+10
|
* accounts, consensus, core, eth: make chain maker consensus agnostic (#15497)gary rong2017-12-222-3/+5
| | | | | | | | | | * accounts, consensus, core, eth: make chain maker consensus agnostic * consensus, core: move CalcDifficulty to Engine interface * consensus: add docs for calcDifficulty function * consensus, core: minor comment fixups
* core/bloombits: handle non 8-bit boundary section matchesPéter Szilágyi2017-11-151-0/+1
|
* build: enable unconvert linter (#15456)ferhat elmas2017-11-111-1/+1
| | | | | | | | | * build: enable unconvert linter - fixes #15453 - update code base for failing cases * cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-1/+1
|
* les, light: LES/2 protocol version (#14970)Felföldi Zsolt2017-10-242-6/+9
| | | | | | | | | | | | | | | | | | This PR implements the new LES protocol version extensions: * new and more efficient Merkle proofs reply format (when replying to a multiple Merkle proofs request, we just send a single set of trie nodes containing all necessary nodes) * BBT (BloomBitsTrie) works similarly to the existing CHT and contains the bloombits search data to speed up log searches * GetTxStatusMsg returns the inclusion position or the pending/queued/unknown state of a transaction referenced by hash * an optional signature of new block data (number/hash/td) can be included in AnnounceMsg to provide an option for "very light clients" (mobile/embedded devices) to skip expensive Ethash check and accept multiple signatures of somewhat trusted servers (still a lot better than trusting a single server completely and retrieving everything through RPC). The new client mode is not implemented in this PR, just the protocol extension.
* core/bloombits, eth/filters: handle null topics (#15195)Péter Szilágyi2017-09-275-46/+26
| | | | | | | | | | When implementing the new bloombits based filter, I've accidentally broke null topics by removing the special casing of common.Hash{} filter rules, which acted as the wildcard topic until now. This PR fixes the regression, but instead of using the magic hash common.Hash{} as the null wildcard, the PR reworks the code to handle nil topics during parsing, converting a JSON null into nil []common.Hash topic.
* core/bloombits: use general filters instead of addresses and topicsZsolt Felfoldi2017-09-061-1/+18
|
* core/bloombits: AddBloom index parameter and fixes variable namesZsolt Felfoldi2017-09-061-1/+1
|
* core, eth: clean up bloom filtering, add some testsPéter Szilágyi2017-09-065-295/+184
|
* core, eth: add bloombit indexer, filter based on itZsolt Felfoldi2017-09-065-173/+464
|
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-5/+5
|
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-184-68/+185
|
* eth: fix megacheck warningsEgon Elbre2017-08-084-8/+4
|
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-12/+0
| | | | | | | | | | | | | | * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer
* core: refactor genesis handlingFelix Lange2017-03-232-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-235-11/+8
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* event: deprecate TypeMux and related typesFelix Lange2017-01-251-2/+2
| | | | | | | | | | | The Subscription type is gone, all uses are replaced by *TypeMuxSubscription. This change is prep-work for the introduction of the new Subscription type in a later commit. gorename -from '"github.com/ethereum/go-ethereum/event"::Event' -to TypeMuxEvent gorename -from '"github.com/ethereum/go-ethereum/event"::muxsub' -to TypeMuxSubscription gofmt -w -r 'Subscription -> *TypeMuxSubscription' ./event/*.go find . -name '*.go' -and -not -regex '\./vendor/.*' \| xargs gofmt -w -r 'event.Subscription -> *event.TypeMuxSubscription'
* all: fix spelling errorsPéter Szilágyi2017-01-072-2/+2
|
* all: gofmt -w -sFelix Lange2017-01-063-18/+18
|
* core/vm: move Log to core/typesFelix Lange2017-01-065-75/+70
| | | | | | | | This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
* eth/filters: add FindOnce for iterator-like operation (#3435)Nick Johnson2016-12-201-20/+50
| | | | | | | | | | | This commit introduces a FindOnce method for filters. FindOnce finds the next block that matches the filter and returns all matching logs from that block. If there are no further matching logs, it returns a nil slice. This method allows callers to iterate over large sets of logs progressively. The changes introduce a small inefficiency relating to mipmaps: the first time a filter is called, it acts as if all mipmaps are matched, and thus iterates several blocks near the requested start point. This is in the interest of simplicity and avoiding duplicate mipmap lookups each time FindOnce is called.
* core, core/vm, eth/filters: move Removed field into vm.LogFelix Lange2016-12-054-109/+63
| | | | | | | | | | | | This field used to be assigned by the filter system and returned through the RPC API. Now that we have a Go client that uses the underlying type, the field needs to move. It is now assigned to true when the RemovedLogs event is generated so the filter system doesn't need to care about the field at all. While here, remove the log list from ChainSideEvent. There are no users of this field right now and any potential users could subscribe to RemovedLogsEvent instead.
* eth/filter: add support for pending logs (#3219)bas-vk2016-11-286-90/+302
|
* eth/filters: simplify query object decodingFelix Lange2016-11-281-47/+44
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-132-3/+5
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* core/types: remove header accessorsFelix Lange2016-11-091-2/+2
| | | | | | These accessors were introduced by light client changes, but the only method that is actually used is GetNumberU64. This commit replaces all uses of .GetNumberU64 with .Number.Uint64.
* cmd, eth: added light client and light server modeszsfelfoldi2016-11-094-56/+108
|
* les: light client protocol and APIZsolt Felfoldi2016-11-094-16/+99
|
* rpc: refactor subscriptions and filtersBas van Kervel2016-08-175-722/+928
|
* core: ensure the canonical block is written before the canonical hash is setBas van Kervel2016-08-161-3/+6
|
* Merge pull request #2711 from hdiedrich/1.4.7-filter-races-cleanupFelix Lange2016-07-202-28/+54
|\ | | | | Fix #2710 Filter race: concurrent map read and map write
| * eth: fix #2710 filter racesHenning Diedrich2016-07-042-28/+54
| | | | | | | | and locking bugs found in its wake.
* | accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-2/+2
|/
* core: improved chainDb using sequential keyszsfelfoldi2016-06-073-6/+7
|
* eth/filter: bugfix which can cause a nil pointer crash when parsing filter ↵Bas van Kervel2016-05-172-38/+234
| | | | arguments
* eth/filters: ignore logs that don't match filter criteria on chain reorgBas van Kervel2016-04-281-1/+1
|
* rpc: remove NotifierContextKeyFelix Lange2016-04-161-1/+1
| | | | | | | Context keys must have a unique type in order to prevent any unintented clashes. The code used int(1) as key. Fix it by implementing the pattern recommended by package context.
* all: fix go vet warningsFelix Lange2016-04-153-8/+8
|
* all: update license informationFelix Lange2016-04-155-9/+41
|
* rpc: add pub/sub supportBas van Kervel2016-04-021-13/+66
|
* eth: various typosLeif Jurvetson2016-03-162-2/+2
|
* cmd, eth, ethdb, node: prioritise chaindata for resources, bump cachePéter Szilágyi2016-03-091-2/+2
|
* eth/filters: ✨ pending logs ✨Jeffrey Wilcke2016-02-134-40/+119
| | | | | | Pending logs are now filterable through the Go API. Filter API changed such that each filter type has it's own bucket and adding filter explicitly requires you specify the bucket to put it in.
* eth/filters: added notifications for out of bound log eventsJeffrey Wilcke2016-02-054-26/+132
| | | | | | Out of Bound log events are events that were removed due to a fork. When logs are received the filtering mechanism should check for the `removed` field on the json structure.
* cmd, eth, rpc: fix some RPC issues with pending blocksPéter Szilágyi2016-02-031-2/+2
|
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-261-1/+1
|
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+575
|
* core, eth, miner, xeth: clean up tx/receipt db accessorsPéter Szilágyi2015-11-191-4/+4
|
* cmd/utils, rpc/comms: stop XEth when IPC connection endsFelix Lange2015-10-301-53/+35
| | | | | | | | | | | There are a bunch of changes required to make this work: - in miner: allow unregistering agents, fix RemoteAgent.Stop - in eth/filters: make FilterSystem.Stop not crash - in rpc/comms: move listen loop to platform-independent code Fixes #1930. I ran the shell loop there for a few minutes and didn't see any changes in the memory profile.
* core, eth, trie: fix data races and merge/review issuesPéter Szilágyi2015-10-211-17/+16
|
* core: differentiate receipt concensus and storage decodingPéter Szilágyi2015-10-191-1/+1
|
* core, eth/filters, miner, xeth: Optimised log filteringJeffrey Wilcke2015-10-172-63/+255
| | | | | | | Log filtering is now using a MIPmap like approach where addresses of logs are added to a mapped bloom bin. The current levels for the MIP are in ranges of 1.000.000, 500.000, 100.000, 50.000, 1.000. Logs are therefor filtered in batches of 1.000.
* eth/filters: added benchmarkJeffrey Wilcke2015-10-162-7/+96
|
* core, eth, event, miner, xeth: fix event post / subscription racePéter Szilágyi2015-10-121-16/+28
|
* cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-042-7/+12
| | | | | | * Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted.
* cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-042-11/+11
| | | | | | | | | | | | | | | | | * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * core/vm: byte code VM moved to jump table instead of switch * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * Byte code VM now shares the same code as the JITVM * Renamed Context to Contract * Changed initialiser of state transition & unexported methods * Removed the Execution object and refactor `Call`, `CallCode` & `Create` in to their own functions instead of being methods. * Removed the hard dep on the state for the VM. The VM now depends on a Database interface returned by the environment. In the process the core now depends less on the statedb by usage of the env * Moved `Log` from package `core/state` to package `core/vm`.
* core, event/filter, xeth: refactored filter systemJeffrey Wilcke2015-10-032-0/+344
Moved the filtering system from `event` to `eth/filters` package and removed the `core.Filter` object. The `filters.Filter` object now requires a `common.Database` rather than a `eth.Backend` and invokes the `core.GetBlockByX` directly rather than thru a "manager".