Skip to content

feat(system-test/cre): link owner to v2 wf registry - #19346

Merged
MStreet3 merged 22 commits into
developfrom
cre-852/link-owner-in-test
Sep 16, 2025
Merged

MStreet3 merged 22 commits into
developfrom
cre-852/link-owner-in-test

Conversation

@MStreet3

@MStreet3 MStreet3 commented Sep 11, 2025 •

Copy link
Copy Markdown
Contributor

This PR links the workflow owner to the V2 workflow registry and corrects a few configuration bugs for using both V2 registries e2e. Includes a fix to the V2 workflow registry syncer that was blocking syncing.

supercedes #19362

Requires

Supports

@MStreet3 MStreet3 changed the title Cre 852/link owner in test feat(system-test/cre): link owner to v2 wf registry Sep 15, 2025
// Convert payload fields into Solidity-compatible data types and concatenate them in the expected order.
// Use the same hashing algorithm as the Solidity contract (keccak256) to hash the concatenated data.
// Finally, follow the EIP-191 standard to create the final hash for signing.
func PreparePayloadForSigning(payload OwnershipProofSignaturePayload) ([]byte, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there a library or util in chainlink-common we can use instead of maintaining this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it will live in the CRE CLI @shileiwill @anirudhwarrier is there a plan to put this in a shared library?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1 for putting this somewhere shared since it's fairly involved logic

patrickhuie19
patrickhuie19 previously approved these changes Sep 15, 2025
donID := uint32(1)
donFamily := "A"

tickChan := make(chan time.Time)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just use the default ticker created by the syncer

jmank88
jmank88 previously approved these changes Sep 15, 2025
patrickhuie19
patrickhuie19 previously approved these changes Sep 16, 2025
var filename string
if tb == nil {
filename = fmt.Sprintf("%s_%d.log", uuid.NewString(), time.Now().UnixNano())
filename = fmt.Sprintf("%s_%s.log", time.Now().Format(timeLayout), uuid.NewString())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You seem to have reversed the order from uuid_time to time_uuid. Here and below.
Is that intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done for readability. only humans look for these logs atm for manual debugging.

if _, exists := nopMap[nopName]; !exists {
nopMap[nopName] = capabilities_registry_v2.CapabilitiesRegistryNodeOperator{
Admin: common.Address{}, // Will be set by the deployment framework
Admin: common.HexToAddress(fmt.Sprintf("0xaadd00000000000000000000000000000000000%d", i+1)),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would't this break when i+1 = 10?
I assume 10 is 2 digits, that increases the address string length, which might be an invalid address.

jmank88
jmank88 previously approved these changes Sep 16, 2025
agparadiso
agparadiso previously approved these changes Sep 16, 2025
@cl-sonarqube-production

Copy link
Copy Markdown

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.

7 participants