Skip to content

Conversation

@GabrielMartinezRodriguez
Copy link
Contributor

@GabrielMartinezRodriguez GabrielMartinezRodriguez commented Feb 3, 2025

Linked Issues

Description

This PR creates a new smart contract that is queried by the node every block to obtain the randomness contract address. The node then retrieves the randomness contract owner to prioritize all transactions from this wallet at the beginning of the block. This ensures that the reveal randomness transaction is included first, making the randomness available for all transactions in the block.

This allows us to modify the randomness contract address and the randomness contract owner without having to relaunch the sequencer, which would otherwise cause a small downtime and require us to request assistance from the Caldera team.

Toggle Checklist

Checklist

Basics

  • B1. I have applied the proper label & proper branch name
  • B2. This PR is not so big that it should be split & addresses only one concern
  • B3. The PR targets the lowest branch it can (ideally master)

Correctness

  • C1. Builds and passes tests
  • C2. The code is properly parameterized & compatible with different environments
  • C3. I have manually tested my changes & connected features
  • C4. I have performed a thorough self-review of my code

Architecture & Documentation

  • D1. I made it easy to reason locally about the code
  • D2. All public-facing APIs & meaningful internal APIs are properly documented
  • D3. If appropriate, the general architecture is documented

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 3, 2025

Deploying happychain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 823c0fe
Status: ✅  Deploy successful!
Preview URL: https://30ea6a8d.happychain.pages.dev
Branch Preview URL: https://gabriel-config-contract.happychain.pages.dev

View logs

@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title feat: add config contract and deployment script Add config contract and deployment script Feb 3, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/improve-performance-and-reability-randomness branch from 6e8d5d5 to 0c346ec Compare February 3, 2025 12:42
@linear
Copy link

linear bot commented Feb 3, 2025

@GabrielMartinezRodriguez GabrielMartinezRodriguez marked this pull request as ready for review February 3, 2025 12:51
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the title Add config contract and deployment script Add config contract Feb 3, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez added the reviewing-1 Ready for, or undergoing first-line review label Feb 3, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/improve-performance-and-reability-randomness branch from 0c346ec to d7da0dc Compare February 3, 2025 13:16
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/improve-performance-and-reability-randomness branch from d7da0dc to 17b16b6 Compare February 4, 2025 13:51
@GabrielMartinezRodriguez GabrielMartinezRodriguez force-pushed the gabriel/improve-performance-and-reability-randomness branch from 17b16b6 to b8df4e4 Compare February 5, 2025 14:03
@aodhgan aodhgan added merge-after-changes Can be merged after requested changes are made and removed reviewing-1 Ready for, or undergoing first-line review labels Feb 12, 2025
@aodhgan aodhgan added question Something has to be cleared up after review and removed merge-after-changes Can be merged after requested changes are made labels Feb 12, 2025
@GabrielMartinezRodriguez GabrielMartinezRodriguez changed the base branch from graphite-base/404 to gabriel/improve-performance-and-reability-randomness February 14, 2025 10:29
@GabrielMartinezRodriguez GabrielMartinezRodriguez added reviewing-2 Ready for, or undergoing final review and removed question Something has to be cleared up after review labels Feb 14, 2025
Base automatically changed from gabriel/improve-performance-and-reability-randomness to master February 15, 2025 03:30
Copy link
Collaborator

@norswap norswap Feb 15, 2025

Choose a reason for hiding this comment

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

It might make sense to separate this from random eventually (if we add other addreses here), but for now this is good.

@norswap norswap added merge-after-changes Can be merged after requested changes are made and removed reviewing-2 Ready for, or undergoing final review labels Feb 15, 2025
@norswap
Copy link
Collaborator

norswap commented Feb 15, 2025

Just needs a restack.

@GabrielMartinezRodriguez GabrielMartinezRodriguez merged commit 7c00fbe into master Feb 17, 2025
3 checks passed
@GabrielMartinezRodriguez GabrielMartinezRodriguez deleted the gabriel/config-contract branch February 17, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-after-changes Can be merged after requested changes are made

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants