Bootstrapping a flow-go/integration/localnet

I want to use a localnet for development. After running make init and make start I get a running set of access, collection, consensus, and execution nodes. I can access the AccessAPI through localhost, but I’m not sure where to find the keys/account credentials from the genesis block.

The end result I’m looking for is to use the localnet AccessAPI and publish contracts, create accounts. I just need and account and credentials to get started there.

Bump. Just hoping someone will see this. Thanks!

@pete @vishal Do you know the answer to this?

1 Like

@Morgan below is the service account, I spent one hour on this because of SHA2_256 signature :slight_smile:

"emulator-account": {
		"address": "8c5303eaa26202d6",
        "keys": [
            {
                "signatureAlgorithm": "ECDSA_P256",
		        "hashAlgorithm": "SHA2_256",
		        "type": "hex",
		        "keyIndex": 0,
		        "context": {
			        "privateKey": "8ae3d0461cfed6d6f49bfc25fa899351c39d1bd21fdba8c87595b6c49bb4cc43"
		        }
            }],

@bluesign thanks for commenting! Where is this file located within flow-go/integration/localnet?

Hey No problem,

I found the private key there:

./flow-go/utils/unittest/execution_state.go

const ServiceAccountPrivateKeyHex = "e3a08ae3d0461cfed6d6f49bfc25fa899351c39d1bd21fdba8c87595b6c49bb4cc430201"

Service account address, I think from execution state. But don’t remember much.

Awesome, thanks! I was looking for those in the generate state folders…