Skip to content

Conversation

theref
Copy link
Contributor

@theref theref commented Mar 27, 2024

Type of PR:

  • Feature

Required reviews:

  • 3

@theref theref requested review from cygnusv, manumonti and vzotova March 27, 2024 16:33
@theref theref marked this pull request as draft March 27, 2024 16:33
collection.endTimestamp = collection.initTimestamp + submissionWindow;
collection.nonce =
uint256(keccak256(abi.encodePacked(block.timestamp, block.difficulty))) %
10 ** 18;
Copy link
Member

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.

}

// Function for nodes to submit their online status with evidence
function submitEvidence(uint32 id, bytes[] memory signatures, address[] memory peers) public {
Copy link
Member

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.


ITACoChildApplication public immutable application;

uint256 public submissionWindow = 1 hours;
Copy link
Member

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.

Collection[] public collections;

constructor() {
admin = msg.sender;
Copy link
Member

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.

Copy link
Member

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

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