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(core): add contract acceptance utxo features #4145

Merged
merged 4 commits into from
May 30, 2022

Conversation

mrnaveira
Copy link
Contributor

Description

  • Adds ContractAcceptance struct to the side-chain output features
  • Implements consensus encoding/decoding for ContractAcceptance
  • Updates related gRPC types and conversions

Motivation and Context

Create structs for contract acceptance in the side-chain features.

How Has This Been Tested?

  • New unit test for consensus encoding/decoding of the ContractAcceptance
  • Existing unit/integration test pass

@aviator-app aviator-app bot added mq-failed and removed mq-failed labels May 27, 2022
@aviator-app aviator-app bot added mq-failed and removed mq-failed labels May 30, 2022
@aviator-app aviator-app bot added mq-failed and removed mq-failed labels May 30, 2022
@stringhandler stringhandler merged commit 2636cb5 into tari-project:development May 30, 2022
stringhandler added a commit that referenced this pull request Jun 7, 2022
Description
---
- New gRPC method in the validator node for publishing a contract acceptance,
    - The only parameter for now is the `contract_id`
    - The validator node internally uses its own public key for building the acceptance.
    - The signature of the acceptance only has a mock value for now. When we have contract constitutions in place, we probably would want it to be the signature of a hash of a contract constitution identification.
    - Calls the new gRPC method in the wallet to publish the transaction
 - New gRPC method in the wallet to submit a contract acceptance. It builds and sends to the network a contract acceptance with the corresponding flags and features 

Motivation and Context
---
Validator nodes need to be able to publish contract acceptances, for contracts in which they are included as committee members. 

This PR continues [previous work](#4145) and provides a gRPC method in the validator node (and a corresponding one in the wallet) to publish contract acceptances. 

The functionality can be used in future work for implementing both auto-acceptance and manually acceptance of contract constitutions.

How Has This Been Tested?
---
New integration test that publishes and mines a contract acceptance through the new validator node gRPC endpoint



* add wallet method to submit an acceptance

* grpc methods to submit an acceptance

* use the new acceptance features

* fix code format

* initial version of the integration test

* new integration test that publishes an acceptance

* using variable grpc address in vn tests

* wallets publishes the acceptance tx

* asserting that the acceptance is mined

* fix integration test js code format

* compiling the vn on integration test start

* apply pr suggestions

Co-authored-by: stringhandler <[email protected]>
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.

3 participants