Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tendermint block uploading #697

Merged
merged 62 commits into from May 28, 2019

Conversation

Projects
None yet
3 participants
@folex
Copy link
Contributor

commented May 25, 2019

partly implements #623

What's implemented:

  • Operations for block retrieval (via Tendermint websocket rpc subscription)
  • Send & retrieve receipts (master node -> state machine)
  • Send & retrieve vm hash (state machine -> master node)
  • Block uploading (as described in paper): txs receipt, manifest uploading, receipt chaining

What's missing:

  • 1st block retrieval (if we're too late with WRPC subscription)
  • Storing block manifests in a way they could be used on Tendermint restart

Currently, block uploading is disabled via hardcode. Correspondingly, state machine doesn't retrieve receipts nor does it send vmHash to master node. Though code for all that is implemented, it is blocked by missing features (mainly - tendermint restart).

Let's discuss what tests are missing, I'm open for advice!

folex added some commits May 13, 2019

WIP
WIP
Merge branch 'master' into tendermint/blocks
# Conflicts:
#	project/SbtCommons.scala
Merge branch 'master' into tendermint/blocks
# Conflicts:
#	.gitattributes
#	build.sbt

folex added some commits May 23, 2019

@folex folex requested review from alari and DieMyst May 25, 2019

@folex folex self-assigned this May 25, 2019

folex added some commits May 27, 2019

build.sbt Outdated
@@ -334,7 +368,7 @@ lazy val `kademlia-testkit` = (project in file("kademlia/testkit"))
libraryDependencies ++= Seq(
scalaTest
)
).dependsOn(`kademlia`)
).dependsOn(kademlia)

This comment has been minimized.

Copy link
@alari

alari May 28, 2019

Contributor

Backticks plz

Show resolved Hide resolved ...ry/src/main/scala/fluence/effects/tendermint/block/history/Receipt.scala
extends WebsocketTendermintRpc with slogging.LazyLogging {

val RpcUri = uri"http://$host:$port"
logger.info(s"TendermintRpc started, uri: $RpcUri")

This comment has been minimized.

Copy link
@alari

alari May 28, 2019

Contributor

What do you mean with "started" here?

This comment has been minimized.

Copy link
@folex

folex May 28, 2019

Author Contributor

renamed to created

logger.debug("eth config {}", masterConf.contract)
(for {
implicit0(sttp: STTP) <- sttpResource
implicit0(dockerIO: DockerIO[IO]) <- DockerIO.make[IO]()

This comment has been minimized.

Copy link
@alari

alari May 28, 2019

Contributor

Yeah! This looks much better :)

return Resource.pure(())
}

val services = worker.services

This comment has been minimized.

Copy link
@alari

alari May 28, 2019

Contributor

Perhaps you may import worker.services

@@ -100,13 +111,14 @@ class AbciHandler[F[_]: Effect](

override def requestCommit(
requestCommit: RequestCommit
): ResponseCommit =
): ResponseCommit = {

This comment has been minimized.

Copy link
@alari

alari May 28, 2019

Contributor

Why?

@@ -38,7 +38,7 @@ case class AbciState(
appHash: ByteVector = ByteVector.empty,
blockSessions: Set[String] = Set.empty,
responses: Queue[(Tx.Head, Array[Byte])] = Queue.empty,
sessions: Sessions = Sessions()
sessions: Sessions = Sessions(),

This comment has been minimized.

Copy link
@alari

alari May 28, 2019

Contributor

Why?

folex added some commits May 28, 2019

@alari

alari approved these changes May 28, 2019

@folex folex merged commit 631e089 into master May 28, 2019

9 checks passed

ci/circleci: backend sdk Your tests passed on CircleCI!
Details
ci/circleci: cli Your tests passed on CircleCI!
Details
ci/circleci: deploy scripts Your tests passed on CircleCI!
Details
ci/circleci: js sdk Your tests passed on CircleCI!
Details
ci/circleci: sbt all tests Your tests passed on CircleCI!
Details
ci/circleci: smart contract Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.