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

feat: Register Data Validator Transaction #285

Merged
merged 3 commits into from
Mar 24, 2022

Conversation

inchori
Copy link

@inchori inchori commented Mar 23, 2022

Implement Register Data Validator Transaction

  • Implement RegisterDataValidator method in keeper/pool.go.
  • Configure DataValidator message in tx.proto for store data validator.

In next PR, I'll implement Cmd for Register Data Validator transaction.

Comment on lines 55 to 57
string endpoint = 1;
}
Copy link
Author

Choose a reason for hiding this comment

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

I just put a endpoint field in DataValidator message. Refer to this docs, the some fields can be added.

Copy link
Contributor

Choose a reason for hiding this comment

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

My guess is that the DataValidator should contain an address as well.
How about adding an address like this?

message DataValidator {
  string address = 1;
  string endpoint = 2;
}

Perhaps additional different values will be added during actual development.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this might be better.

return []sdk.AccAddress{dataValidator}
}

var _ sdk.Msg = &MsgCreatePool{}
Copy link
Author

Choose a reason for hiding this comment

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

Because I need to write test code, I implemented all of our transaction such as MsgCreatePool, MsgSellData, MsgBuyDataAccessNFT in message_pool.go.

@inchori inchori linked an issue Mar 23, 2022 that may be closed by this pull request
@inchori inchori added the Market Data Marketplace for Web3.0 label Mar 23, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines 55 to 57
string endpoint = 1;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

My guess is that the DataValidator should contain an address as well.
How about adding an address like this?

message DataValidator {
  string address = 1;
  string endpoint = 2;
}

Perhaps additional different values will be added during actual development.

proto/panacea/datapool/v2/tx.proto Outdated Show resolved Hide resolved
x/datapool/keeper/pool.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gyuguen gyuguen left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@0xHansLee 0xHansLee left a comment

Choose a reason for hiding this comment

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

LGTM.

After merging this branch, I will rebase it for #275. Thanks!

@inchori inchori merged commit 7595cf3 into master Mar 24, 2022
@inchori inchori deleted the ft/274/register_data_validator_tx branch March 24, 2022 08:05
@inchori inchori added this to the Data Pool Model milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Market Data Marketplace for Web3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the MsgRegisterDataValidator transaction
3 participants