Skip to content

Catchup service through gossip connections using the topics#913

Merged
tsachiherman merged 10 commits intoalgorand:masterfrom
algonautshant:shant/peerCatchup
Mar 20, 2020
Merged

Catchup service through gossip connections using the topics#913
tsachiherman merged 10 commits intoalgorand:masterfrom
algonautshant:shant/peerCatchup

Conversation

@algonautshant
Copy link
Copy Markdown
Contributor

  • Introduce versioning: old: 1, new: 2.1
  • Add keys to topics as const in topics.go
  • Introduce MakeTopic to create topics without exporting the Topic fields
  • Change wsPeer.Respond to accept Topics instead of OutgoingMessage
  • Add methods: Version, Request, Respond to UnicastPeer interface (should rename UnicastPeer?)
  • Make LedgerService handleCatchupReq support v2.1 (request/respond using topics)
  • Make WsFetcherService RequestBlock support v2.1 (request/respond using topics)

Modifying TestGetBlockWS to test version 2.1

Test Plan

Will add e2e test to test all cases of the two version combinations.

Copy link
Copy Markdown
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few requested changes above; I haven't reviewed the unit testing yet.

Comment thread network/topics.go Outdated
Comment thread network/topics.go Outdated
Comment thread network/wsPeer.go Outdated
Comment thread network/wsPeer.go Outdated
Comment thread rpcs/ledgerService.go Outdated
Comment thread rpcs/wsFetcherService.go Outdated
Comment thread rpcs/ledgerService.go Outdated
Comment thread rpcs/ledgerService.go Outdated
@algonautshant algonautshant requested a review from pzbitskiy March 13, 2020 17:51
Comment thread rpcs/ledgerService.go Outdated
Comment thread rpcs/ledgerService.go Outdated
Comment thread rpcs/wsFetcherService.go Outdated
Copy link
Copy Markdown
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you address the topics issue mentioned, and add unit testing for the error cases ?
( i.e. test to see that you get the expected error string. )
hint : make the error string a const error and test against that string.

Comment thread network/topics.go Outdated
Comment thread rpcs/ledgerService.go Outdated
Comment thread rpcs/ledgerService.go Outdated
* Introduce versioning: old: 1, new: 2.1
* Add keys to topics as const in topics.go
* Introduce MakeTopic to create topics without exporting the Topic fields
* Change wsPeer.Respond to accept Topics instead of OutgoingMessage
* Add methods: Version, Request, Respond to UnicastPeer interface (should rename UnicastPeer?)
* Make LedgerService handleCatchupReq support v2.1 (request/respond using topics)
* Make WsFetcherService RequestBlock support v2.1 (request/respond using topics)

Modifying TestGetBlockWS to test version 2.1
* Moving the const topic keys to their respective packages
* Enhancing error checking and error reporting
* Switching the block order for v1 and v2.1
…erriding the network protocol version.

* Added Version() function to UnicastPeer interface to return the peer matching version.
* Added cross-network-version catchup e2e test
* Allowed TestCatchupOverGossip to run on darwin
* Fixed RestClientFixture SetupNoStart
Copy link
Copy Markdown
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. thanks!

@tsachiherman tsachiherman merged commit cea8009 into algorand:master Mar 20, 2020
@algonautshant algonautshant deleted the shant/peerCatchup branch March 20, 2020 15:35
@algonautshant algonautshant linked an issue Mar 20, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Darwin: basicCatchup_test.go

2 participants