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

Relay upgrade #373

Merged
merged 21 commits into from
Sep 17, 2024
Merged

Relay upgrade #373

merged 21 commits into from
Sep 17, 2024

Conversation

kkirkov
Copy link
Contributor

@kkirkov kkirkov commented Aug 5, 2024

Implement changes that were proposed by reviews of #284
Those suggestions can be found in comments in the above PR and on: https://coda.io/d/_d6vM0kjfQP6#My-Tasks_tuy0e/r1012&view=modal

@kkirkov kkirkov force-pushed the relay-upgrade branch 3 times, most recently from 60a23bd to b208715 Compare August 6, 2024 12:14
@kkirkov kkirkov force-pushed the relay-upgrade branch 5 times, most recently from 72cbd31 to b7df04e Compare August 23, 2024 08:08
@Dimo99 Dimo99 changed the base branch from main to relay_MOCK September 5, 2024 10:25
Base automatically changed from relay_MOCK to main September 5, 2024 13:13
@kkirkov kkirkov force-pushed the relay-upgrade branch 4 times, most recently from 69234ee to a585b4d Compare September 12, 2024 12:05
@Dimo99 Dimo99 force-pushed the relay-upgrade branch 3 times, most recently from 2d6472a to 656633a Compare September 13, 2024 18:10
Dimo99
Dimo99 previously approved these changes Sep 14, 2024
@@ -71,6 +72,32 @@ export async function publishTransaction(
});
}

switch (chainId) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you can use the data-driven programming approach as @PetarKirov suggested

But it can be done in a following PR.

Comment on lines 22 to 36
export enum NetworkConfig {
Pratter = 'pratter',
Mainnet = 'mainnet',
Sepolia = 'sepolia',
Chiado = 'chiado',
}

export function isSupportedFollowNetwork(network: string): boolean {
return Object.values(NetworkConfig).includes(network as NetworkConfig);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remind me why Enum but not union type?

Not a blocker, just wandering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enum is what I had in mind, remade it with union as it makes more sence

vendor/snarkjs Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks scary. It's nice to see it worked out!

.env.example Outdated
Comment on lines 16 to 21
BEACON_REST_API_PRATTER=
BEACON_REST_API_MAINNET=
BEACON_REST_API_SEPOLIA=
BEACON_REST_API_CHIADO=
REDIS_HOST=localhost
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are so many empty? Smt forgotten or?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The public api-s I know of are not very stable so I wouldnt recommend them(could still add those here I guess), the Light-client contracts(LC_Sepolia) and the Hashi contracts(Sepolia_Hashi) are for whoever is using DendrETH to create them and add to his .env file and as for the RPCs yes I can add those but anyone can find them with a quick google search so I dont feel like thats necessary

Copy link
Contributor

@EmilIvanichkovv EmilIvanichkovv left a comment

Choose a reason for hiding this comment

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

Huge PR but with a good commit history! Thanks!

Left a couple of comments, none of which a blocker.

@PetarKirov PetarKirov merged commit c37fc87 into main Sep 17, 2024
13 checks passed
@PetarKirov PetarKirov deleted the relay-upgrade branch September 17, 2024 13:44
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.

4 participants