aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[framework] improve resource account with initial data

Open davidiw opened this issue 3 years ago • 7 comments
trafficstars

As we started deploying our own contracts, we realized that one would need to pass in additional data out of band to make a really standalone contract in some cases. This isn't ideal. This example isn't particularly elegant but it is ... generalizable. we'll benefit from a bcs parser (not deserializer) that can be told what to parse next.


This change is Reviewable

davidiw avatar Sep 25 '22 04:09 davidiw

Forge is running suite land_blocking on c0834a982f87a06654f454fd0110aa3c773c57a4

github-actions[bot] avatar Sep 25 '22 05:09 github-actions[bot]

Forge is running suite compat on 843b204dce971d98449b82624f4f684c7a18b991 ==> c0834a982f87a06654f454fd0110aa3c773c57a4

github-actions[bot] avatar Sep 25 '22 05:09 github-actions[bot]

:white_check_mark: Forge suite land_blocking success on c0834a982f87a06654f454fd0110aa3c773c57a4

performance benchmark with full nodes : 7805 TPS, 5094 ms latency, 8400 ms p99 latency,(!) expired 40 out of 3332860 txns
Test Ok

github-actions[bot] avatar Sep 25 '22 06:09 github-actions[bot]

:white_check_mark: Forge suite compat success on 843b204dce971d98449b82624f4f684c7a18b991 ==> c0834a982f87a06654f454fd0110aa3c773c57a4

Compatibility test results for 843b204dce971d98449b82624f4f684c7a18b991 ==> c0834a982f87a06654f454fd0110aa3c773c57a4 (PR)
1. Check liveness of validators at old version: 843b204dce971d98449b82624f4f684c7a18b991
compatibility::simple-validator-upgrade::liveness-check : 7949 TPS, 4776 ms latency, 7900 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: c0834a982f87a06654f454fd0110aa3c773c57a4
compatibility::simple-validator-upgrade::single-validator-upgrade : 5808 TPS, 6575 ms latency, 8800 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: c0834a982f87a06654f454fd0110aa3c773c57a4
compatibility::simple-validator-upgrade::half-validator-upgrade : 5204 TPS, 7290 ms latency, 9400 ms p99 latency,no expired txns
4. upgrading second batch to new version: c0834a982f87a06654f454fd0110aa3c773c57a4
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7766 TPS, 4800 ms latency, 8700 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for 843b204dce971d98449b82624f4f684c7a18b991 ==> c0834a982f87a06654f454fd0110aa3c773c57a4 passed
Test Ok

github-actions[bot] avatar Sep 25 '22 06:09 github-actions[bot]

Btw, this will need to go through gatekeepers to be included in the current main branch. So even if this gets another approval, DO NOT LAND IT.

davidiw avatar Sep 25 '22 19:09 davidiw

@wrwg , it would be great to figure out some sort of means to do guided bcs deserialization of primitives... that way folks can pass in arbitrary bytes, decode them into primitives, and then into types that they are able to instantiate -- safely.

I know some bridges have worked around this by rebuilding a Move-based guided deserializer... maybe that's good enough.

davidiw avatar Oct 28 '22 16:10 davidiw

@wrwg , it would be great to figure out some sort of means to do guided bcs deserialization of primitives... that way folks can pass in arbitrary bytes, decode them into primitives, and then into types that they are able to instantiate -- safely.

I know some bridges have worked around this by rebuilding a Move-based guided deserializer... maybe that's good enough.

Wondering is this more than we have already here? https://github.com/aptos-labs/aptos-core/blob/main/aptos-move/framework/aptos-stdlib/doc/from_bcs.md

wrwg avatar Oct 28 '22 18:10 wrwg

@davidiw is this still happening or should we close it?

gregnazario avatar Dec 06 '22 20:12 gregnazario

/cough/ @davidiw

gregnazario avatar Dec 28 '22 21:12 gregnazario

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

github-actions[bot] avatar Feb 12 '23 02:02 github-actions[bot]

I will save you one day....

davidiw avatar Feb 15 '23 16:02 davidiw

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

github-actions[bot] avatar Apr 03 '23 01:04 github-actions[bot]