Skip to content

Commit

Permalink
Merge branch 'main' into deploy/mainnet
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/assets/integrationnet-lambda-payload.json
#	.github/assets/mainnet-lambda-payload.json
#	.github/assets/testnet-lambda-payload.json
#	metagraph/modules/data_l1/src/main/scala/com/my/dor_metagraph/data_l1/seedlists/dl1-integrationnet-seedlist
#	metagraph/modules/data_l1/src/main/scala/com/my/dor_metagraph/data_l1/seedlists/dl1-mainnet-seedlist
#	metagraph/modules/l0/src/main/scala/com/my/dor_metagraph/l0/seedlists/ml0-integrationnet-seedlist
#	metagraph/modules/l1/src/main/scala/com/my/dor_metagraph/l1/seedlists/cl1-integrationnet-seedlist
  • Loading branch information
IPadawans committed Feb 1, 2024
2 parents 9ad4286 + 49e2684 commit 6f682cd
Show file tree
Hide file tree
Showing 48 changed files with 1,206 additions and 610 deletions.
6 changes: 4 additions & 2 deletions .github/assets/integrationnet-lambda-payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"metagraph": {
"id": "DAG5kfY9GoHF1CYaY8tuRJxmB3JSzAEARJEAkA2C",
"name": "DOR",
"version": "v1.0.1",
"version": "v1.2.0",
"include_currency_l1_layer": true,
"include_data_l1_layer": true,
"file_system": {
Expand Down Expand Up @@ -30,7 +30,9 @@
"DATA_L1_NODE_URL=http://54.218.46.24:9000/cluster/info"
],
"additional_currency_l1_env_variables": [],
"additional_data_l1_env_variables": [],
"additional_data_l1_env_variables": [
"DOR_API_URL=https://api.getdor.com/metagraph/device"
],
"seedlists": {
"location": "Github",
"ml0": {
Expand Down
6 changes: 4 additions & 2 deletions .github/assets/mainnet-lambda-payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"metagraph": {
"id": "DAG0CyySf35ftDQDQBnd1bdQ9aPyUdacMghpnCuM",
"name": "DOR",
"version": "v1.0.1",
"version": "v1.2.0",
"include_currency_l1_layer": true,
"include_data_l1_layer": true,
"file_system": {
Expand Down Expand Up @@ -30,7 +30,9 @@
"DATA_L1_NODE_URL=http://54.191.143.191:9000/cluster/info"
],
"additional_currency_l1_env_variables": [],
"additional_data_l1_env_variables": [],
"additional_data_l1_env_variables": [
"DOR_API_URL=https://api.getdor.com/metagraph/device"
],
"seedlists": {
"location": "Github",
"ml0": {
Expand Down
6 changes: 4 additions & 2 deletions .github/assets/testnet-lambda-payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"metagraph": {
"id": "DAG8gMagrwoJ4nAMjbGx17WB5D6nqBEPZYChc3zH",
"name": "DOR",
"version": "v1.0.1",
"version": "v1.2.0",
"include_currency_l1_layer": true,
"include_data_l1_layer": true,
"file_system": {
Expand Down Expand Up @@ -30,7 +30,9 @@
"DATA_L1_NODE_URL=http://34.212.38.215:9000/cluster/info"
],
"additional_currency_l1_env_variables": [],
"additional_data_l1_env_variables": [],
"additional_data_l1_env_variables": [
"DOR_API_URL=https://api.getdor.com/metagraph/device"
],
"seedlists": {
"location": "Github",
"ml0": {
Expand Down
2 changes: 1 addition & 1 deletion .github/templates/build_tessellation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ runs:
git checkout $TESSELLATION_VERSION
sbt clean
sbt kernel/publishM2 dagL1/publishM2 keytool/publishM2 shared/publishM2 sdk/publishM2 currencyL0/publishM2 currencyL1/publishM2
sbt kernel/publishM2 dagL1/publishM2 keytool/publishM2 shared/publishM2 nodeShared/publishM2 currencyL0/publishM2 currencyL1/publishM2
6 changes: 3 additions & 3 deletions .github/templates/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ runs:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
uses: "./.github/templates/setup_java_and_scala"

- name: Generate Metagraph JARS
- name: Test and Generate Metagraph JARS 🚀
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
shell: bash
run: |
cd metagraph
sbt currencyL1/assembly currencyL0/assembly dataL1/assembly
sbt 'test;currencyL0/assembly;currencyL1/assembly;dataL1/assembly'
- name: Move JARS to artifact folder
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions metagraph/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ lazy val sharedData = (project in file("modules/shared_data"))
CompilerPlugin.betterMonadicFor,
CompilerPlugin.semanticDB,
Libraries.tessellationDAGL1,
Libraries.tessellationSDK,
Libraries.tessellationNodeShared,
Libraries.tessellationShared,
Libraries.tessellationCurrencyL1,
Libraries.borerCore,
Expand All @@ -74,7 +74,7 @@ lazy val currencyL1 = (project in file("modules/l1"))
CompilerPlugin.betterMonadicFor,
CompilerPlugin.semanticDB,
Libraries.tessellationDAGL1,
Libraries.tessellationSDK,
Libraries.tessellationNodeShared,
Libraries.tessellationShared,
Libraries.tessellationCurrencyL1
)
Expand Down Expand Up @@ -103,7 +103,7 @@ lazy val currencyL0 = (project in file("modules/l0"))
Libraries.declineEffect,
Libraries.tessellationKernel,
Libraries.tessellationDAGL1,
Libraries.tessellationSDK,
Libraries.tessellationNodeShared,
Libraries.tessellationShared,
Libraries.tessellationKeytool,
Libraries.tessellationCurrencyL0
Expand All @@ -129,7 +129,7 @@ lazy val dataL1 = (project in file("modules/data_l1"))
CompilerPlugin.betterMonadicFor,
CompilerPlugin.semanticDB,
Libraries.tessellationDAGL1,
Libraries.tessellationSDK,
Libraries.tessellationNodeShared,
Libraries.tessellationShared,
Libraries.tessellationCurrencyL1
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,26 @@ package com.my.dor_metagraph.data_l1

import cats.data.NonEmptyList
import cats.effect.{IO, Resource}
import cats.syntax.validated._
import cats.syntax.applicative.catsSyntaxApplicativeId
import cats.syntax.option.catsSyntaxOptionId
import cats.syntax.validated._
import com.my.dor_metagraph.shared_data.LifecycleSharedFunctions
import com.my.dor_metagraph.shared_data.calculated_state.CalculatedStateService
import com.my.dor_metagraph.shared_data.decoders.Decoders
import com.my.dor_metagraph.shared_data.deserializers.Deserializers
import com.my.dor_metagraph.shared_data.serializers.Serializers
import com.my.dor_metagraph.shared_data.types.Types.{CheckInDataCalculatedState, CheckInStateOnChain, CheckInUpdate}
import io.circe.{Decoder, Encoder}
import org.http4s._
import org.http4s.{EntityDecoder, HttpRoutes}
import org.tessellation.BuildInfo
import org.tessellation.currency.dataApplication.dataApplication.{DataApplicationBlock, DataApplicationValidationErrorOr}
import org.tessellation.currency.dataApplication._
import org.tessellation.currency.dataApplication.dataApplication.{DataApplicationBlock, DataApplicationValidationErrorOr}
import org.tessellation.currency.l1.CurrencyL1App
import org.tessellation.schema.cluster.ClusterId
import org.tessellation.security.signature.Signed
import org.http4s.EntityDecoder
import org.tessellation.ext.cats.effect.ResourceIO
import org.tessellation.schema.SnapshotOrdinal
import org.tessellation.schema.cluster.ClusterId
import org.tessellation.security.hash.Hash
import org.tessellation.security.signature.Signed

import java.util.UUID

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
197280d110642ff3af86bf846b6ca3a3b5861a0b0691cc376812d10b3ae4e7b3b0d489391e56343377e7efa13299635931961c623c1debaa49e645f31cb1ff1f
388f6a85155018075047fc197e9e0d1f0101d422c2216a9d7603eee1c3aafa080053e51c835e4a870609de8349e7d0e6e852c5a2dd1e6a3e8b51c24baa8af28f
e288f7cab826ea0c27fad7b0700171e60e96a68dcee1e7a942bc8a9950929c1c6a609d08ffc7114f17bc841e6d261972fcc862eadd08c81fe17bf99a1d9218e5
e288f7cab826ea0c27fad7b0700171e60e96a68dcee1e7a942bc8a9950929c1c6a609d08ffc7114f17bc841e6d261972fcc862eadd08c81fe17bf99a1d9218e5
f1322ca97b3374caa38deb14cce786e47cb8cfdbb58dddb14b1fce698b1830c6f8bbf5dfc47b60464ce3fe7b7d66930d05e5de86177ba36891629bbd6da1fc84
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
5faa4745ce734da07e565b93f8ff7a84b546db7ecc2a51d2202e79b7aa96a4640eca7982352234c17230035e935ac5622c735bfcf64d1716b6081c1d305ba4df
6270ff668e17d41e922b9c28baddf04737d705bd9b22d36f10968de53e9e830638632a2c99a296a8da16137d9cea93ceaf72b24f0e197cc5e95b53bda3b77790
c9a1bdca053ddb1ec4201d77c0c561b0a4386715f754255ff5dec7d08635535cd544e4256d90b1aaf8cb13e89ed1495db35139548fb0b254cc4554ffaae4ecb6
c9a1bdca053ddb1ec4201d77c0c561b0a4386715f754255ff5dec7d08635535cd544e4256d90b1aaf8cb13e89ed1495db35139548fb0b254cc4554ffaae4ecb6
a0a88c98e47614391590198288fa8e5587e7d4858e245de1a256e00e1c8ac93a8f67964370f45d40fb514a61d2aaca716bda050878a1365dfee651a6ff547cfa
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package com.my.dor_metagraph.l0

import cats.data.NonEmptyList
import cats.effect.{IO, Resource}
import cats.syntax.validated._
import cats.syntax.applicative._
import cats.syntax.option._
import cats.syntax.validated._
import com.my.dor_metagraph.l0.custom_routes.CustomRoutes
import com.my.dor_metagraph.l0.rewards.MainRewards
import com.my.dor_metagraph.l0.rewards.DorRewards
import com.my.dor_metagraph.l0.rewards.bounties.{AnalyticsBountyRewards, DailyBountyRewards}
import com.my.dor_metagraph.l0.rewards.validators.ValidatorNodesAPI
import com.my.dor_metagraph.shared_data.LifecycleSharedFunctions
import com.my.dor_metagraph.shared_data.calculated_state.CalculatedStateService
import com.my.dor_metagraph.shared_data.decoders.Decoders
Expand All @@ -16,13 +18,13 @@ import com.my.dor_metagraph.shared_data.types.Types.{CheckInDataCalculatedState,
import io.circe.{Decoder, Encoder}
import org.http4s.{EntityDecoder, HttpRoutes}
import org.tessellation.BuildInfo
import org.tessellation.currency.dataApplication._
import org.tessellation.currency.dataApplication.dataApplication.{DataApplicationBlock, DataApplicationValidationErrorOr}
import org.tessellation.currency.dataApplication.{BaseDataApplicationL0Service, DataApplicationL0Service, DataState, DataUpdate, L0NodeContext}
import org.tessellation.currency.l0.CurrencyL0App
import org.tessellation.currency.l0.snapshot.CurrencySnapshotEvent
import org.tessellation.currency.schema.currency.{CurrencyIncrementalSnapshot, CurrencySnapshotStateProof}
import org.tessellation.ext.cats.effect.ResourceIO
import org.tessellation.sdk.domain.rewards.Rewards
import org.tessellation.node.shared.domain.rewards.Rewards
import org.tessellation.schema.SnapshotOrdinal
import org.tessellation.schema.cluster.ClusterId
import org.tessellation.security.SecurityProvider
Expand Down Expand Up @@ -145,7 +147,16 @@ object Main extends CurrencyL0App(
override def dataApplication: Option[Resource[IO, BaseDataApplicationL0Service[IO]]] =
makeL0Service.asResource.some

override def rewards(implicit sp: SecurityProvider[IO]): Option[Rewards[IO, CurrencySnapshotStateProof, CurrencyIncrementalSnapshot, CurrencySnapshotEvent]] =
MainRewards.make[IO].some
override def rewards(implicit sp: SecurityProvider[IO]): Option[Rewards[IO, CurrencySnapshotStateProof, CurrencyIncrementalSnapshot, CurrencySnapshotEvent]] = {
val dailyBountyRewards = new DailyBountyRewards[IO]
val analyticsBountyRewards = new AnalyticsBountyRewards[IO]
val validatorNodes = new ValidatorNodesAPI[IO]

DorRewards.make[IO](
dailyBountyRewards,
analyticsBountyRewards,
validatorNodes
).some
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.http4s.circe.CirceEntityCodec.circeEntityEncoder
import org.http4s.dsl.Http4sDsl
import eu.timepit.refined.auto._
import org.http4s.server.middleware.CORS
import org.tessellation.http.routes.internal.{InternalUrlPrefix, PublicRoutes}
import org.tessellation.routes.internal.{InternalUrlPrefix, PublicRoutes}

case class CustomRoutes[F[_] : Async](calculatedStateService: CalculatedStateService[F]) extends Http4sDsl[F] with PublicRoutes[F] {

Expand Down

This file was deleted.

Loading

0 comments on commit 6f682cd

Please sign in to comment.