Skip to content

scaffolding the Txin and TxinVoter data types and msg#1

Merged
brewmaster012 merged 23 commits intomainfrom
start
Oct 6, 2021
Merged

scaffolding the Txin and TxinVoter data types and msg#1
brewmaster012 merged 23 commits intomainfrom
start

Conversation

@brewmaster012
Copy link
Collaborator

No description provided.

vikingshield and others added 13 commits September 29, 2021 14:08
Txin correspond to user deposit event;
TxinVoter is Txin reported by each validator with signature
Once >2/3 TxinVoter is included in blocks, MetaCore
will consider the Txin accepted.
use ctx to get accNum and accSeq instead of REST API.
can now get rid of the REST API of MetaCore completely.
Every interaction is through the gRPC.
which can be used to track application level "consensus"
for an external Event (indexed by its txHash. Crucially,
only one such Event can present in a single tx).
brewmaster012 added 9 commits October 3, 2021 14:06
to keep track of the validator set.
This message is supposed to create a NodeAccount,
which will be introduced in later commit.
cmd:
starport scaffold map NodeAccount nodeAddress pubkeySet nodeStatus --no-message
In the future, bond needs to be checked.
Bech32PrefixConsAddr = "metac"
Bech32PrefixConsPub = "metacpub"
DenomRegex = `[a-zA-Z][a-zA-Z0-9:\\/\\\-\\_\\.]{2,127}`
METAChainCoinType uint32 = 933
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this determined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

MainNet
// MockNet network for main net
MockNet
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this for testing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes mocknet generally refers to local net mode, not even testnet

}
return bech32.Encode(hrp, converted)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

What is pubkeyset used for and why are we commenting it out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will be used as part of validator node identity. The validator use ed25519 key for validation and secp256k1 key for node identify. We’ll need this when we deal with validator change, or voters logic

require (
github.com/btcsuite/btcd v0.21.0-beta
github.com/btcsuite/btcutil v1.0.2
github.com/cosmos/cosmos-sdk v0.42.6
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need btc modules?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe not. Let me check. Sometimes we may need their cryptography library

sourceAmount:
type: string
format: uint64
mBurnt:
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is auto generated for web API. In response to refining data types of protobuf. When starport scaffold everyhing is string. I then change datatype to more refined ones.

return "", err
}
builder.SetGasLimit(200000000)
fmt.Printf("signing from name: %s\n", ctx.GetFromName())
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this gas limit for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Our meta blockchain also use gas to limit tx size and computation...

@@ -0,0 +1,14 @@
syntax = "proto3";
package MetaProtocol.metacore.metacore;

Copy link
Contributor

Choose a reason for hiding this comment

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

What does node account represent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A validator node, keys, ip, rewards, status, etc

@ankurzeta
Copy link
Contributor

+1

@brewmaster012 brewmaster012 merged commit 20178ea into main Oct 6, 2021
@brewmaster012 brewmaster012 deleted the start branch October 6, 2021 01:30
CharlieMc0 pushed a commit that referenced this pull request Jun 27, 2023
Txin, TxinVoter, MetaBridge
CharlieMc0 pushed a commit that referenced this pull request Jun 27, 2023
Txin, TxinVoter, MetaBridge
CharlieMc0 pushed a commit that referenced this pull request Sep 12, 2023
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.

4 participants