Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Testnet Bootstrap and Resource Credits #3168

Closed
inertia186 opened this issue Nov 19, 2018 · 2 comments
Closed

Testnet Bootstrap and Resource Credits #3168

inertia186 opened this issue Nov 19, 2018 · 2 comments
Assignees

Comments

@inertia186
Copy link

inertia186 commented Nov 19, 2018

As a developer, or an automatic process, I want to be able to reduce/bypass/eliminate/address the checks on resource credits in fastgen mode, so that I can bootstrap a new testnet without worrying too much about resource credits.

In a nutshell, some operations are being rejected during bootstrap. It's not a huge issue, but it's impacting the number of useful accounts being created/updated in testnet.

I realize this probably could be addressed by resource delegation pools, so I'm just trying to get ahead of this problem by looking into other alternatives and make sure we're aware of the issue.

Another way to address this would be to always bootstrap account creation and account updates in HF19 and then use "wait blocks" to reach the desired hardfork, but I think that might not be a good long term solution.

This is an example of what's happening at bootstrap of a testnet:

Example Broadcast

The reason we do account_update_operation in testnet bootstrap is to a) assign tnman auths, and b) assign the original auths the account had on mainnet, since at this point, those accounts (now) all exist on testnet. The more any error occures, the less likely we will be able to assign any auths.

{
   "operations":[
      {
         "value":{
            "json_metadata":"{\"profile\":{\"profile_image\":\"http://i.imgur.com/9iuEXs0.png\"}}",
            "active":{
               "key_auths":[
                  [
                     "TST7AAHxLJiDkJz9w54Kgb5pNq5oED7tLX4ntDUbtNsQ3DxeBuakp",
                     1
                  ]
               ],
               "account_auths":[
                  [
                     "tnman",
                     1
                  ]
               ],
               "weight_threshold":1
            },
            "memo_key":"TST7XLbJwwn3kN5uwamfhx3ND8W8ku5QxPNkaKezSJkZhUHyVzofr",
            "account":"steemprentice",
            "posting":{
               "key_auths":[
                  [
                     "TST7y65cEB9GuNrPot2j4xt85uBUDZxHfU3mp6XCVK1vuXn4DDUdY",
                     1
                  ]
               ],
               "account_auths":[
                  [
                     "tnman",
                     1
                  ]
               ],
               "weight_threshold":1
            },
            "owner":{
               "key_auths":[
                  [
                     "TST6gv593iUp5D9ahrhnSj11K2VKuaV8JLmdErv6EsEDqXjUu8AqE",
                     1
                  ]
               ],
               "account_auths":[
                  [
                     "tnman",
                     1
                  ]
               ],
               "weight_threshold":1
            }
         },
         "type":"account_update_operation"
      }
   ],
   "ref_block_prefix":2381945408,
   "signatures":[
      "2023b5155cbfb49f396986a8ca111df59709527898b67a8991b82973e9662578fe17d369bc79fd8e6ce0bcc3189942f25abeca29948aa7d6200ebc7447a9c210e9"
   ],
   "ref_block_num":91,
   "expiration":"2018-11-19T04:30:57"
}

Example Error

2305694ms rc_plugin.cpp:987             operator()           ] 4100000 plugin_exception: plugin exception
Account: steemwhit has 360 RC, needs 17896 RC. Please wait to transact, or power up STEEM.
    {"account":"steemwhit","rc_needed":17896,"rc_current":360}
    rc_plugin.cpp:249 operator()
2018-11-19T04:38:25.705505054Z 

Steps to Recreate Issue

To recreate this issue before your very eyes, just launch a toy testnet:

docker run inertia/tintoy:latest

This example launches a whole new private testnet but only tries to create about 2000 accounts. In doing so, 166 accounts could not be updated (and are therefore mostly useless for testing) due to limitations on resource credits:

tintoy: finshed piping /app/sample-txgen-latest.actions, total errors: 185 (rc_needed errors: 166)
@inertia186
Copy link
Author

I would love it if this could be an option as runtime arguments:

ilog( "RC's will be computed starting at block ${b}", ("b", my->_enable_at_block) );

@inertia186
Copy link
Author

Major improvement! Nice job!

tintoy: finshed piping /app/sample-txgen-latest.actions, total errors: 67 (rc_needed errors: 0)

See: gist:fc9f6bc

vogel76 pushed a commit to blocktradesdevs/steem that referenced this issue Mar 11, 2019
bwsdeveloper pushed a commit to blocktradesdevs/steem that referenced this issue Mar 11, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants