-
Notifications
You must be signed in to change notification settings - Fork 11
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
[WIP] Peer Snitching Contract #248
base: main
Are you sure you want to change the base?
Conversation
contracts/contracts/TACoEvidence.sol
Outdated
collection.endTimestamp = collection.initTimestamp + submissionWindow; | ||
collection.nonce = | ||
uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty))) % | ||
10 ** 18; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why mod 10^18? Unless there's a good reason, I'd drop it.
contracts/contracts/TACoEvidence.sol
Outdated
} | ||
|
||
// Function for nodes to submit their online status with evidence | ||
function submitEvidence(uint32 id, bytes[] memory signatures, address[] memory peers) public { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove the peers
parameter, and simply extract the operator address (as you currently do in L85), and then cross-check with the staking provider address.
contracts/contracts/TACoEvidence.sol
Outdated
|
||
ITACoChildApplication public immutable application; | ||
|
||
uint256 public submissionWindow = 1 hours; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be made immutable
.
contracts/contracts/TACoEvidence.sol
Outdated
Collection[] public collections; | ||
|
||
constructor() { | ||
admin = msg.sender; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't defined, right? Anyway, I'd define as immutable too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change it to Ownable and owner
Type of PR:
Required reviews: