Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Runtime does unnecessary account cloning when obtaining the executable accounts #9737

Closed
jackcmay opened this issue Apr 27, 2020 · 1 comment
Assignees
Milestone

Comments

@jackcmay
Copy link
Contributor

Problem

The loading program and executable accounts are done independently and may duplicate account cloning if an executable account is also passed as a parameter. This is due to an old assumption that there was no overlap between executable accounts and parameter accounts. With cross-program invocations, executable accounts may be passed as parameters and exist in both the executable and program accounts as separate cloned accounts.

This duplicate account cloning also occurs in the cross-program invocation call flow since it uses the same data types as typical transaction processing.

Proposed Solution

Use Rc and RefCell to share a single copy and eliminate the extra cloning. Once the new data types are used in the typical transition processing call flow update cross-program invocations and remove the unnecessary clone there too.

@jackcmay jackcmay self-assigned this Apr 27, 2020
@mvines mvines added this to the v1.2.0 milestone Apr 30, 2020
@mvines mvines modified the milestones: v1.2.0, v1.3.0 May 21, 2020
@mvines mvines modified the milestones: v1.3.0, v1.4.0 Aug 5, 2020
@mvines mvines modified the milestones: v1.4.0, v1.5.0 Oct 8, 2020
@mvines mvines modified the milestones: v1.5.0, v1.6.0 Dec 17, 2020
@jackcmay
Copy link
Contributor Author

Fixed via #14574

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants