Commit Graph

7370 Commits

Author SHA1 Message Date
ecde4df0f4 add some notes + intentions 2019-07-31 08:10:47 +02:00
2545b73804 break out demuxer 2019-07-30 12:17:51 +02:00
9ae692e09d more typos 2019-07-30 12:17:35 +02:00
cb39a41a44 typo 2019-07-30 12:01:09 +02:00
c14f8892d0 Isolated routine testing:
+ Test that events can looop throught the routine
    + Test that routines can be stateful
    + Test that routines can prioritize processing errors
2019-07-29 17:56:56 +02:00
82fa9e110b re-org 2019-07-29 15:53:28 +02:00
27960dc60a fix exit behaviour 2019-07-29 12:47:43 +02:00
1816a4c127 provide seperate queue for errors 2019-07-29 12:40:59 +02:00
ddaf82422b complete deterministic processessing 2019-07-29 11:58:13 +02:00
f77fde35c4 Refacor routines to reduce duplication 2019-07-29 08:45:59 +02:00
ed7b3bb89b handlers now flush all events before stopping 2019-07-28 09:07:35 +02:00
6621857bfb more nonsense 2019-07-27 11:38:37 +02:00
fa60855cca toy example 2019-07-27 10:58:58 +02:00
0786f4593f more nonsense 2019-07-27 00:25:32 +02:00
97a7fcb183 WIP 2019-07-25 16:02:47 +02:00
ac151b6065 Split up large FSM test into per-transition tests 2019-07-19 18:06:08 +03:00
8e940ad9aa Better testing for markPending 2019-07-19 11:32:50 +03:00
a790f14340 Test cleanup 2019-07-19 11:18:21 +03:00
1828f860f7 Cleanup peer removal and block resetting 2019-07-19 11:06:09 +03:00
38eb781138 add missing events 2019-07-19 10:42:08 +03:00
10ff7bd342 Peer pruning 2019-07-19 02:17:49 +03:00
5f84e3ecf5 Simplify error handling 2019-07-19 01:44:27 +03:00
18fcda8c93 Add slow peer testing 2019-07-18 11:12:27 +03:00
e6c5d2ca63 all tests pass 2019-07-16 18:34:02 +03:00
88f142fcd4 at least it runs 2019-07-15 22:49:20 +03:00
d69e280334 at least it compiles 2019-07-15 22:17:25 +03:00
c91ab0c7b0 WIP: progress on converting pseudocode 2019-07-14 23:50:58 +03:00
1b95954b88 WIP scheduler test 2019-07-14 21:45:16 +03:00
6bce04e0c2 add some standin error handling 2019-07-12 14:26:20 +03:00
122ff60427 flesh out scheduler 2019-07-12 14:13:53 +03:00
4f10f0c0eb initial sketch of a scheduler 2019-07-09 15:17:42 +02:00
c9e63b3fa0 integrate with behavior package 2019-06-28 12:42:27 +02:00
90301c85a3 updated documentation, fixed more golint warnings 2019-06-23 17:42:27 +02:00
bf41ac2d2c cleanup, golint, renaming stuff 2019-06-19 15:18:08 +02:00
7bf1683077 move both reactor versions under blockchain 2019-06-19 11:32:26 +02:00
f0559a05b0 fix config template 2019-06-18 13:26:49 +02:00
208dedc5ed golangci fixes 2019-06-18 12:37:43 +02:00
2ec9faa51a sync to develop 2019-06-18 11:57:22 +02:00
bf3229f456 Add configuration flag fast sync version 2019-06-18 11:30:27 +02:00
ed18ffdca3 p2p: refactor Switch#OnStop (#3729) 2019-06-17 13:30:12 +02:00
0e1c492d3e docs: missing 'b' in python command (#3728)
In Python 3 the command outlined in this doc `import codecs; codecs.decode("YWJjZA==", 'base64').decode('ascii')` throws an error:
TypeError: decoding with 'base64' codec failed (TypeError: expected bytes-like object, not str), needs to add 'b' before the encoded string
`import codecs; codecs.decode(b"YWJjZA==", 'base64').decode('ascii')` to make it work
2019-06-17 12:51:12 +02:00
9010ff5f96 types: do not ignore errors returned by PublishWithEvents (#3722)
Follow up to #3643

* update changelog

* do not ignore errors returned by PublishWithEvents
2019-06-12 15:25:47 +02:00
ab0835463f abci: Refactor tagging events using list of lists (#3643)
## PR

This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events.

    Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like:

"rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}]
"sender": [{"address": "...", "balance": "100uatom"}]

The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...'

    ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair.
    PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings.

closes: #1859
closes: #2905

## Commits:

* Implement Event ABCI type and updates responses to use events

* Update messages_test.go

* Update kvstore.go

* Update event_bus.go

* Update subscription.go

* Update pubsub.go

* Update kvstore.go

* Update query logic to handle slice of strings in events

* Update Empty#Matches and unit tests

* Update pubsub logic

* Update EventBus#Publish

* Update kv tx indexer

* Update godocs

* Update ResultEvent to use slice of strings; update RPC

* Update more tests

* Update abci.md

* Check for key in validateAndStringifyEvents

* Fix KV indexer to skip empty keys

* Fix linting errors

* Update CHANGELOG_PENDING.md

* Update docs/spec/abci/abci.md

Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Update abci/types/types.proto

Co-Authored-By: Ethan Buchman <ethan@coinculture.info>

* Update docs/spec/abci/abci.md

Co-Authored-By: Ethan Buchman <ethan@coinculture.info>

* Update libs/pubsub/query/query.go

Co-Authored-By: Ethan Buchman <ethan@coinculture.info>

* Update match function to match if ANY value matches

* Implement TestSubscribeDuplicateKeys

* Update TestMatches to include multi-key test cases

* Update events.go

* Update Query interface godoc

* Update match godoc

* Add godoc for matchValue

* DRY-up tx indexing

* Return error from PublishWithEvents in EventBus#Publish

* Update PublishEventNewBlockHeader to return an error

* Fix build

* Update events doc in ABCI

* Update ABCI events godoc

* Implement TestEventBusPublishEventTxDuplicateKeys

* Update TestSubscribeDuplicateKeys to be table-driven

* Remove mod file

* Remove markdown from events godoc

* Implement TestTxSearchDeprecatedIndexing test
v0.32.0-dev0
2019-06-12 14:03:45 +02:00
8b7ca8fd99 switch to go mod (#3613)
* Update to using go mod from dep

* Remove references to make get_vendor_deps

* Specify go version

* Set GO111MODULE=on and add -mod=readonly

* Fix exported env

* switch to using go1.12 everywhere

* Fix test scripts

* Typo:

* Prepend GO111MODULE=on

* remove dep cache

* Revert "remove dep cache"

This reverts commit 45117bda

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* bring back the dependency cache and change it to cache modules instead
of vendored deps; also:

 - bump version for dependency cache
 - bump version on pkg-cache (includes modules directory)

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* remove some more traces of dep:
 - remove Gopkg.(toml | lock)
 - update contributing guidlines
 - set global default in circleci (GO111MODULE=on)

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* global var failed for `test_cover` with
`go: unknown environment setting GO111MODULE=true`
although the var was `GO111MODULE: on`

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Changelog pending entry

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Add bbolt dependency to go.mod

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* move -mod=readonly to build flags
2019-06-09 16:27:48 +04:00
ed896f508b Merge pull request #3720 from Yawning/boltdb-fixes
Fix fundemental BoltDB backend correctness issues.
2019-06-07 10:43:32 +02:00
319ecb3005 libs/db: Fix the BoltDB Get and Iterator
BoltDB's accessors will return slices that are only valid for the
lifetime of the transaction.  This adds copies where required to prevent
hard to debug crashes (among other things).
2019-06-07 08:26:58 +00:00
f46ed4aac8 libs/db: Fix the BoltDB Batch.Delete
`Delete` should queue a delete operation that targets the entire
database, and not just keys that happen to be in the current batch.
2019-06-07 08:26:20 +00:00
6a7d4182b4 p2p: Peerbehaviour follow up (#3653) (#3663)
* Move peer behaviour into it's own package
* refactor wip
* Adjust API and fix tests
* remove unused test struct
* Better error message
* Restructure:
    + Now behaviour is it's own package, we don't need to include
    PeerBehaviour in every type.
    + Split up behaviours and reporters into seperate files

* doc string fixes
* Fix minor typos
* Update behaviour/reporter.go
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update behaviour/reporter.go
Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
2019-06-06 22:33:39 +02:00
1f0d2f3e12 cleanup and godoc 2019-06-06 21:50:15 +02:00
bceb15e91a change to int for max number of pending requests 2019-06-06 18:21:32 +02:00