Skip to content

Commit

Permalink
Merge pull request #7 from rarimo/feature/worldcoin
Browse files Browse the repository at this point in the history
Update: v1.1.0
  • Loading branch information
olegfomenko authored Dec 23, 2023
2 parents 86fe5b4 + 4341ad8 commit ee4a695
Show file tree
Hide file tree
Showing 30 changed files with 2,387 additions and 209 deletions.
19 changes: 19 additions & 0 deletions docs/common/mainnet/002-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ title: Mainnet upgrades

# Mainnet upgrades

## V1.1.0

Core binary: (
alpine-linux/amd64): "<https://github.com/rarimo/rarimo-core/releases/download/v1.1.0/rarimo-core-alpine-linux-amd64>".

Also, you can build core from sources by yourself: use <"https://github.com/rarimo/rarimo-core/releases/tag/v1.1.0">
release information.

Upgrade will perform automatically if you are using `cosmovisor` under Alpine linux.

Also, if you are using Ubuntu linux, please install `musl-dev` using `sudo apt install musl-dev` command to be able to
use Alpine binary on your machine.

Upgrade v1.1.0 introduces a couple of features for identity transfers:

- New WorldCoin identity transfer
- Fix for the Iden3 identity transfers: GIST and state transfers are split into two different operations.
- Double-sending of confirmation messages will not cause TX error.

## V1.0.7

Core binary: (alpine-linux/amd64): "<https://storage.googleapis.com/rarimo-mainnet/1.0.7/rarimo-core>".
Expand Down
148 changes: 134 additions & 14 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51012,8 +51012,6 @@ paths:
GISTHash:
type: string
title: Hex 0x
GISTReplacedBy:
type: string
GISTCreatedAtTimestamp:
type: string
title: Dec
Expand Down Expand Up @@ -51059,11 +51057,6 @@ paths:
in: query
required: false
type: string
- name: msg.GISTReplacedBy
description: Hex 0x
in: query
required: false
type: string
- name: msg.GISTCreatedAtTimestamp
description: Dec
in: query
Expand Down Expand Up @@ -51725,6 +51718,79 @@ paths:
type: string
tags:
- Query
/rarimo/rarimo-core/oraclemanager/world_coin_identity_transfer:
get:
operationId: RarimoRarimocoreOraclemanagerWorldCoinIdentityTransfer
responses:
'200':
description: A successful response.
schema:
type: object
properties:
transfer:
type: object
properties:
contract:
type: string
chain:
type: string
prevState:
type: string
title: Hex 0x uint256
state:
type: string
title: Hex 0x uint256
timestamp:
type: string
title: Dec uint256
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
parameters:
- name: msg.creator
in: query
required: false
type: string
- name: msg.contract
in: query
required: false
type: string
- name: msg.chain
in: query
required: false
type: string
- name: msg.prevState
description: Hex 0x uint256
in: query
required: false
type: string
- name: msg.state
description: Hex 0x uint256
in: query
required: false
type: string
- name: msg.timestamp
description: Dec uint256
in: query
required: false
type: string
tags:
- Query
/rarimo/rarimo-core/rarimocore/confirmation:
get:
summary: Queries a list of Confirmation items.
Expand Down Expand Up @@ -52272,6 +52338,7 @@ paths:
- IDENTITY_AGGREGATED_TRANSFER
- IDENTITY_GIST_TRANSFER
- IDENTITY_STATE_TRANSFER
- WORLDCOIN_IDENTITY_TRANSFER
default: TRANSFER
details:
title: Corresponding to type details
Expand Down Expand Up @@ -52761,6 +52828,7 @@ paths:
- IDENTITY_AGGREGATED_TRANSFER
- IDENTITY_GIST_TRANSFER
- IDENTITY_STATE_TRANSFER
- WORLDCOIN_IDENTITY_TRANSFER
default: TRANSFER
details:
title: Corresponding to type details
Expand Down Expand Up @@ -89808,9 +89876,6 @@ definitions:
GISTHash:
type: string
title: Hex 0x
GISTReplacedBy:
type: string
title: Hex 0x
GISTCreatedAtTimestamp:
type: string
title: Dec
Expand Down Expand Up @@ -89905,6 +89970,26 @@ definitions:
type: string
rarimo.rarimocore.oraclemanager.MsgCreateTransferOpResponse:
type: object
rarimo.rarimocore.oraclemanager.MsgCreateWorldCoinIdentityTransferOp:
type: object
properties:
creator:
type: string
contract:
type: string
chain:
type: string
prevState:
type: string
title: Hex 0x uint256
state:
type: string
title: Hex 0x uint256
timestamp:
type: string
title: Dec uint256
rarimo.rarimocore.oraclemanager.MsgCreateWorldCoinIdentityTransferOpResponse:
type: object
rarimo.rarimocore.oraclemanager.MsgStakeResponse:
type: object
rarimo.rarimocore.oraclemanager.MsgUnjailResponse:
Expand Down Expand Up @@ -90131,8 +90216,6 @@ definitions:
GISTHash:
type: string
title: Hex 0x
GISTReplacedBy:
type: string
GISTCreatedAtTimestamp:
type: string
title: Dec
Expand Down Expand Up @@ -90326,6 +90409,25 @@ definitions:
title: Seed is used to generate PDA address for Solana
uri:
type: string
rarimo.rarimocore.oraclemanager.QueryGetWorldCoinIdentityTransferResponse:
type: object
properties:
transfer:
type: object
properties:
contract:
type: string
chain:
type: string
prevState:
type: string
title: Hex 0x uint256
state:
type: string
title: Hex 0x uint256
timestamp:
type: string
title: Dec uint256
rarimo.rarimocore.oraclemanager.QueryParamsResponse:
type: object
properties:
Expand Down Expand Up @@ -90405,8 +90507,6 @@ definitions:
GISTHash:
type: string
title: Hex 0x
GISTReplacedBy:
type: string
GISTCreatedAtTimestamp:
type: string
title: Dec
Expand Down Expand Up @@ -90502,6 +90602,22 @@ definitions:
- 'YES'
- 'NO'
default: 'YES'
rarimo.rarimocore.rarimocore.WorldCoinIdentityTransfer:
type: object
properties:
contract:
type: string
chain:
type: string
prevState:
type: string
title: Hex 0x uint256
state:
type: string
title: Hex 0x uint256
timestamp:
type: string
title: Dec uint256
rarimo.rarimocore.tokenmanager.ItemMetadata:
type: object
properties:
Expand Down Expand Up @@ -90566,6 +90682,7 @@ definitions:
- IDENTITY_AGGREGATED_TRANSFER
- IDENTITY_GIST_TRANSFER
- IDENTITY_STATE_TRANSFER
- WORLDCOIN_IDENTITY_TRANSFER
default: TRANSFER
rarimo.rarimocore.rarimocore.Operation:
type: object
Expand All @@ -90584,6 +90701,7 @@ definitions:
- IDENTITY_AGGREGATED_TRANSFER
- IDENTITY_GIST_TRANSFER
- IDENTITY_STATE_TRANSFER
- WORLDCOIN_IDENTITY_TRANSFER
default: TRANSFER
details:
title: Corresponding to type details
Expand Down Expand Up @@ -90932,6 +91050,7 @@ definitions:
- IDENTITY_AGGREGATED_TRANSFER
- IDENTITY_GIST_TRANSFER
- IDENTITY_STATE_TRANSFER
- WORLDCOIN_IDENTITY_TRANSFER
default: TRANSFER
details:
title: Corresponding to type details
Expand Down Expand Up @@ -91288,6 +91407,7 @@ definitions:
- IDENTITY_AGGREGATED_TRANSFER
- IDENTITY_GIST_TRANSFER
- IDENTITY_STATE_TRANSFER
- WORLDCOIN_IDENTITY_TRANSFER
default: TRANSFER
details:
title: Corresponding to type details
Expand Down
4 changes: 2 additions & 2 deletions ethermint/indexer/kv_indexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/simapp/params"
"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/rarimo/rarimo-core/app"
"github.com/rarimo/rarimo-core/app/params"
"github.com/rarimo/rarimo-core/ethermint/crypto/ethsecp256k1"
evmenc "github.com/rarimo/rarimo-core/ethermint/encoding"
"github.com/rarimo/rarimo-core/ethermint/indexer"
Expand Down Expand Up @@ -37,7 +37,7 @@ func TestKVIndexer(t *testing.T) {
txHash := tx.AsTransaction().Hash()

encodingConfig := MakeEncodingConfig()
clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig).WithCodec(encodingConfig.Codec)
clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig).WithCodec(encodingConfig.Marshaler)

// build cosmos-sdk wrapper tx
tmTx, err := tx.BuildTx(clientCtx.TxConfig.NewTxBuilder(), "astake")
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ require (
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/gin-gonic/gin v1.8.1 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
Expand All @@ -112,6 +113,7 @@ require (
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
Expand Down Expand Up @@ -1027,6 +1028,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
Expand Down
13 changes: 13 additions & 0 deletions proto/oraclemanager/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "rarimocore/op_transfer.proto";
import "rarimocore/op_identity_default_transfer.proto";
import "rarimocore/op_identity_gist_transfer.proto";
import "rarimocore/op_identity_state_transfer.proto";
import "rarimocore/op_worldcoin_identity_transfer.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/rarimo/rarimo-core/x/oraclemanager/types";
Expand Down Expand Up @@ -38,6 +39,10 @@ service Query {
option (google.api.http).get = "/rarimo/rarimo-core/oraclemanager/identity_state_transfer";
}

rpc WorldCoinIdentityTransfer(QueryGetWorldCoinIdentityTransferRequest) returns (QueryGetWorldCoinIdentityTransferResponse) {
option (google.api.http).get = "/rarimo/rarimo-core/oraclemanager/world_coin_identity_transfer";
}

rpc OracleAll(QueryGetAllOracleRequest) returns (QueryGetAllOracleResponse) {
option (google.api.http).get = "/rarimo/rarimo-core/oraclemanager/oracle";
}
Expand Down Expand Up @@ -94,6 +99,14 @@ message QueryGetIdentityStateTransferResponse {
rarimo.rarimocore.rarimocore.IdentityStateTransfer transfer = 1 [(gogoproto.nullable) = false];
}

message QueryGetWorldCoinIdentityTransferRequest {
rarimo.rarimocore.oraclemanager.MsgCreateWorldCoinIdentityTransferOp msg = 1 [(gogoproto.nullable) = false];
}

message QueryGetWorldCoinIdentityTransferResponse {
rarimo.rarimocore.rarimocore.WorldCoinIdentityTransfer transfer = 1 [(gogoproto.nullable) = false];
}

message QueryGetAllOracleRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
Expand Down
16 changes: 16 additions & 0 deletions proto/oraclemanager/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ service Msg {
rpc CreateIdentityDefaultTransferOperation(MsgCreateIdentityDefaultTransferOp) returns (MsgCreateIdentityDefaultTransferOpResponse);
rpc CreateIdentityGISTTransferOperation(MsgCreateIdentityGISTTransferOp) returns (MsgCreateIdentityGISTTransferOpResponse);
rpc CreateIdentityStateTransferOperation(MsgCreateIdentityStateTransferOp) returns (MsgCreateIdentityStateTransferOpResponse);
rpc CreateWorldCoinIdentityTransferOperation(MsgCreateWorldCoinIdentityTransferOp) returns (MsgCreateWorldCoinIdentityTransferOpResponse);
rpc Vote(MsgVote) returns(MsgVoteResponse);
rpc Unjail(MsgUnjail) returns(MsgUnjailResponse);
}
Expand Down Expand Up @@ -117,6 +118,21 @@ message MsgCreateIdentityStateTransferOp {

message MsgCreateIdentityStateTransferOpResponse {}

message MsgCreateWorldCoinIdentityTransferOp {
string creator = 1;
string contract = 2;
string chain = 3;
// Hex 0x uint256
string prevState = 4;
// Hex 0x uint256
string state = 5;
// Dec uint256
string timestamp = 6;
uint64 blockNumber = 7;
}

message MsgCreateWorldCoinIdentityTransferOpResponse {}

message MsgVote{
rarimo.rarimocore.oraclemanager.OracleIndex index = 1;
string operation = 2;
Expand Down
Loading

0 comments on commit ee4a695

Please sign in to comment.