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

Create utilities and governance contract folders #418

Merged
merged 9 commits into from
Jul 15, 2024

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Jul 10, 2024

Why this should be merged

closes #410

How this works

Reorganized directory structure.

How this was tested

Existing tests

How is this documented

Edited existing documentation.

@geoff-vball geoff-vball force-pushed the gstuart/move-registry branch from 33ced49 to f9cd3f8 Compare July 10, 2024 16:50
@geoff-vball geoff-vball force-pushed the gstuart/move-registry branch from c3ddc1f to cc7e07f Compare July 10, 2024 17:39
@geoff-vball geoff-vball marked this pull request as ready for review July 10, 2024 17:54
@geoff-vball geoff-vball requested a review from a team as a code owner July 10, 2024 17:54
Copy link
Contributor

@cam-schultz cam-schultz left a comment

Choose a reason for hiding this comment

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

One comment about adding an additional generic utilities folder, but otherwise LGTM. Also, I know that lowercasing the directory names was mentioned in the issue, but did we come to a conclusion on that? If we decide to move forward with that, we should do the same in avalanche-interchain-token-transfer.

contracts/src/teleporter/ReceiptQueue.sol Outdated Show resolved Hide resolved
@iansuvak
Copy link
Contributor

Also, I know that lowercasing the directory names was mentioned in the issue, but did we come to a conclusion on that? If we decide to move forward with that, we should do the same in avalanche-interchain-token-transfer.

It was brought up in #404 and I think it makes sense overall. FWIW OZ uses lower cased directory names and ProperCase contract file names. I agree that if we did it here we should do the same in avalanche-interchain-token-transfer repo as well.

Overall LGTM. I just have one minor question below.

@@ -1,6 +1,6 @@
## Utility Contracts
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that it makes sense to separate different logical groups in sub-directories but I'm not sure about the validators name. Does anyone have a better idea? Maybe governance? I think we are more likely to have another governance type contract that would make sense to group this with than a validator related one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

governance sounds pretty good to me. Anyone else have any thoughts?

Choose a reason for hiding this comment

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

i like governance

Copy link
Contributor

Choose a reason for hiding this comment

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

In the original directory mockup on the #404 we agreed to keep Upgradeable files inside the teleporter folder. Apologies for not copying it properly into the issue. I'm not opposed to keeping them here though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I do think it makes sense to keep TeleporterRegistry and TeleporterUpgradeable in the same spot. Would love to hear other opinions if anyone has one :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree we should keep them together, especially if we rename TeleporterUpgradeable as discussed here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was originally thinking we'd put the registry contract under utilities but keep the TeleporterUpgradeable, etc under Teleporter. Names aside, the registry is a standalone contract that isn't inherently tied to Teleporter itself (could be used a general account versioning mechanism controlled by the validator set). The TeleporterUpgradeable contracts OTOH are abstract contracts that are tied to Teleporter in the sense that they import Teleporter interfaces and provide helpers specifically for sending and receiving Teleporter messages (by leveraging a registry instance).

@geoff-vball geoff-vball requested a review from cam-schultz July 11, 2024 13:13
Copy link

@minghinmatthewlam minghinmatthewlam left a comment

Choose a reason for hiding this comment

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

I overall still feel it's a bit strange to classify TeleporterRegistry and the other upgrades contracts under utilities, and the same for governance files. Thinking if those can sibling directories to teleporter or under teleporter. That way we can also remove the need to have another utils folder under utilities.

Copy link
Contributor

@bernard-avalabs bernard-avalabs left a comment

Choose a reason for hiding this comment

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

Generally looks good to me. I agree with some of the name change suggestions made by others, such as validators->governance.

@geoff-vball
Copy link
Contributor Author

I'd be okay having governance and upgrades as top level directories, then we don't have to have utilities/utils.

@geoff-vball
Copy link
Contributor Author

@iansuvak I think I like the lowercase names. If we go ahead with #419, then we can lowercase the directories in ICTT when we move them over.

@iansuvak
Copy link
Contributor

@iansuvak I think I like the lowercase names. If we go ahead with #419, then we can lowercase the directories in ICTT when we move them over.

I agree and I think it makes sense to do it together with #419 implementation instead of a separate issue.

@minghinmatthewlam
Copy link

I'd be okay having governance and upgrades as top level directories, then we don't have to have utilities/utils.

Definitely agree for governance. For upgrades I think the standard is to use it only in context of upgradeability in contracts, and think we should stick with that, so prefer upgrades-> registry. Then because the registry directory and all contracts under are tied to teleporter, i'd prefer to leave under teleporter folder but with the rename.

@geoff-vball geoff-vball force-pushed the gstuart/move-registry branch from 48bcf29 to 633109e Compare July 11, 2024 20:35
@geoff-vball geoff-vball requested a review from iansuvak July 11, 2024 20:36
@geoff-vball geoff-vball changed the title Move Teleporter Registry to utilities folder Create utilities and governance contract folders Jul 12, 2024
Copy link
Contributor

@iansuvak iansuvak 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

@minghinmatthewlam minghinmatthewlam left a comment

Choose a reason for hiding this comment

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

LGTM

@geoff-vball geoff-vball merged commit 512bdd1 into main Jul 15, 2024
14 checks passed
@geoff-vball geoff-vball deleted the gstuart/move-registry branch July 24, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Code organization] - Move TeleporterRegistry to Utilities sub-folder
6 participants