-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(validator_node): add get_sidechain_block p2p rpc method (#3803)
Description --- - Add get_sidechain_blocks to validator node p2p rpc - Use fixed 32-byte array for hashes on dan layer - Implement FromStr and fallible integer conversions for TemplateId - Remove asset_public_key from Instruction - Add necessary chain db calls - Add client call for get_sidechain_blocks - Adds mocks and basic tests for get_sidechain_blocks validator node rpc Motivation and Context --- Allow client to fetch sidechain instruction state from vn How Has This Been Tested? --- Manually
- Loading branch information
Showing
72 changed files
with
1,877 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,4 +99,4 @@ message InvokeMethodRequest{ | |
message InvokeMethodResponse { | ||
string status = 1; | ||
bytes result = 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
syntax = "proto3"; | ||
|
||
package tari.dan.common; | ||
|
||
message SideChainBlock { | ||
Node node = 1; | ||
InstructionSet instructions = 2; | ||
} | ||
|
||
message Node { | ||
bytes hash = 1; | ||
bytes parent = 2; | ||
uint32 height = 3; | ||
bool is_committed = 4; | ||
} | ||
|
||
message Instruction { | ||
uint32 template_id = 1; | ||
string method = 2; | ||
bytes args = 3; | ||
// bytes token_id = 5; | ||
// bytes signature = 6; | ||
} | ||
|
||
message InstructionSet{ | ||
repeated Instruction instructions = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.