Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implemented anchor peer configuration #661

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

YoungHypo
Copy link
Collaborator

@YoungHypo YoungHypo commented Dec 11, 2024

Anchor peer configuration is achieved and the channel is created successfully.

issue #639 is solved.

The api-engine logs are as follows:

2024-12-11 11:15:31 Generating the settings.py for api_engine
2024-12-11 11:15:34 Migrations for 'api':
2024-12-11 11:15:34   api/migrations/0001_initial.py
2024-12-11 11:15:34     - Create model UserProfile
2024-12-11 11:15:34     - Create model Agent
2024-12-11 11:15:34     - Create model ChainCode
2024-12-11 11:15:34     - Create model FabricCA
2024-12-11 11:15:34     - Create model FabricPeer
2024-12-11 11:15:34     - Create model Govern
2024-12-11 11:15:34     - Create model Network
2024-12-11 11:15:34     - Create model Node
2024-12-11 11:15:34     - Create model NodeUser
2024-12-11 11:15:34     - Create model Organization
2024-12-11 11:15:34     - Create model PeerCa
2024-12-11 11:15:34     - Create model User
2024-12-11 11:15:34     - Create model Port
2024-12-11 11:15:34     - Create model PeerCaUser
2024-12-11 11:15:34     - Add field organization to node
2024-12-11 11:15:34     - Add field user to node
2024-12-11 11:15:34     - Create model KubernetesConfig
2024-12-11 11:15:34     - Create model File
2024-12-11 11:15:34     - Create model Channel
2024-12-11 11:15:34     - Add field organization to agent
2024-12-11 11:15:34     - Add field organization to userprofile
2024-12-11 11:15:34     - Add field user_permissions to userprofile
2024-12-11 11:15:35 Operations to perform:
2024-12-11 11:15:35   Apply all migrations: account, api, auth, authtoken, contenttypes, sessions, sites, socialaccount
2024-12-11 11:15:35 Running migrations:
2024-12-11 11:15:35   Applying contenttypes.0001_initial... OK
2024-12-11 11:15:35   Applying contenttypes.0002_remove_content_type_name... OK
2024-12-11 11:15:35   Applying auth.0001_initial... OK
2024-12-11 11:15:35   Applying auth.0002_alter_permission_name_max_length... OK
2024-12-11 11:15:35   Applying auth.0003_alter_user_email_max_length... OK
2024-12-11 11:15:35   Applying auth.0004_alter_user_username_opts... OK
2024-12-11 11:15:35   Applying auth.0005_alter_user_last_login_null... OK
2024-12-11 11:15:35   Applying auth.0006_require_contenttypes_0002... OK
2024-12-11 11:15:35   Applying auth.0007_alter_validators_add_error_messages... OK
2024-12-11 11:15:35   Applying auth.0008_alter_user_username_max_length... OK
2024-12-11 11:15:35   Applying auth.0009_alter_user_last_name_max_length... OK
2024-12-11 11:15:35   Applying auth.0010_alter_group_name_max_length... OK
2024-12-11 11:15:35   Applying auth.0011_update_proxy_permissions... OK
2024-12-11 11:15:35   Applying auth.0012_alter_user_first_name_max_length... OK
2024-12-11 11:15:35   Applying api.0001_initial... OK
2024-12-11 11:15:35   Applying account.0001_initial... OK
2024-12-11 11:15:35   Applying account.0002_email_max_length... OK
2024-12-11 11:15:35   Applying account.0003_alter_emailaddress_create_unique_verified_email... OK
2024-12-11 11:15:35   Applying account.0004_alter_emailaddress_drop_unique_email... OK
2024-12-11 11:15:35   Applying authtoken.0001_initial... OK
2024-12-11 11:15:35   Applying authtoken.0002_auto_20160226_1747... OK
2024-12-11 11:15:35   Applying authtoken.0003_tokenproxy... OK
2024-12-11 11:15:35   Applying authtoken.0004_alter_tokenproxy_options... OK
2024-12-11 11:15:35   Applying sessions.0001_initial... OK
2024-12-11 11:15:35   Applying sites.0001_initial... OK
2024-12-11 11:15:35   Applying sites.0002_alter_domain_unique... OK
2024-12-11 11:15:35   Applying socialaccount.0001_initial... OK
2024-12-11 11:15:35   Applying socialaccount.0002_token_max_lengths... OK
2024-12-11 11:15:35   Applying socialaccount.0003_extra_data_default_dict... OK
2024-12-11 11:15:35   Applying socialaccount.0004_app_provider_id_settings... OK
2024-12-11 11:15:36 Create user successfully 180dcf04-bc57-4e0f-a715-4f4427f0df01
2024-12-11 11:15:39 org1.cello.com
2024-12-11 11:16:14 Status: 201
2024-12-11 11:16:14 {
2024-12-11 11:16:14 "name": "channel",
2024-12-11 11:16:14 "url": "/participation/v1/channels/channel",
2024-12-11 11:16:14 "consensusRelation": "consenter",
2024-12-11 11:16:14 "status": "active",
2024-12-11 11:16:14 "height": 1
2024-12-11 11:16:14 }
2024-12-11 11:16:14 
2024-12-11 11:15:38 INFO /opt/bin/cryptogen generate --output=/opt/cello/org1.cello.com/crypto-config --config=/opt/cello/org1.cello.com/crypto-config.yaml
2024-12-11 11:15:40 INFO /opt/bin/cryptogen extend --input=/opt/cello/org1.cello.com/crypto-config --config=/opt/cello/org1.cello.com/crypto-config.yaml
2024-12-11 11:15:40 INFO /opt/bin/cryptogen extend --input=/opt/cello/org1.cello.com/crypto-config --config=/opt/cello/org1.cello.com/crypto-config.yaml
2024-12-11 11:16:14 INFO /opt/bin/configtxgen -configPath /opt/cello/net/ -profile channel -outputBlock /opt/cello/net/channel.block -channelID channel
2024-12-11 11:16:14 2024-12-11 19:16:14.360 UTC 0001 INFO [common.tools.configtxgen] main -> Loading configuration
2024-12-11 11:16:14 2024-12-11 19:16:14.379 UTC 0002 INFO [common.tools.configtxgen.localconfig] completeInitialization -> orderer type: etcdraft
2024-12-11 11:16:14 2024-12-11 19:16:14.379 UTC 0003 INFO [common.tools.configtxgen.localconfig] Load -> Loaded configuration: /opt/cello/net/configtx.yaml
2024-12-11 11:16:14 2024-12-11 19:16:14.390 UTC 0004 INFO [common.tools.configtxgen] doOutputBlock -> Generating genesis block
2024-12-11 11:16:14 2024-12-11 19:16:14.390 UTC 0005 INFO [common.tools.configtxgen] doOutputBlock -> Creating application channel genesis block
2024-12-11 11:16:14 2024-12-11 19:16:14.393 UTC 0006 INFO [common.tools.configtxgen] doOutputBlock -> Writing genesis block
2024-12-11 11:16:14 INFO /opt/bin/osnadmin channel join --channelID channel --config-block /opt/cello/net/channel.block -o orderer.cello.com:7053 --ca-file /opt/cello/org1.cello.com/crypto-config/ordererOrganizations/cello.com/orderers/orderer.cello.com/msp/tlscacerts/tlsca.cello.com-cert.pem --client-cert /opt/cello/org1.cello.com/crypto-config/ordererOrganizations/cello.com/orderers/orderer.cello.com/tls/server.crt --client-key /opt/cello/org1.cello.com/crypto-config/ordererOrganizations/cello.com/orderers/orderer.cello.com/tls/server.key
2024-12-11 11:16:14 INFO /opt/bin/peer channel join -b /opt/cello/net/channel.block 
2024-12-11 11:16:14 2024-12-11 19:16:14.825 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2024-12-11 11:16:14 2024-12-11 19:16:14.843 UTC 0002 INFO [channelCmd] executeJoin -> Successfully submitted proposal to join channel
2024-12-11 11:16:14 INFO /opt/bin/peer channel fetch config /opt/cello/net/config_block.pb -o orderer.cello.com:7050 --ordererTLSHostnameOverride orderer.cello.com -c channel --tls --cafile /opt/cello/org1.cello.com/crypto-config/ordererOrganizations/cello.com/orderers/orderer.cello.com/msp/tlscacerts/tlsca.cello.com-cert.pem
2024-12-11 11:16:14 DEBUG Attempt 1/5 to fetch block
2024-12-11 11:16:15 2024-12-11 19:16:15.082 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2024-12-11 11:16:15 2024-12-11 19:16:15.089 UTC 0002 INFO [cli.common] readBlock -> Expect block, but got status: &{SERVICE_UNAVAILABLE}
2024-12-11 11:16:15 Error: can't read the block: &{SERVICE_UNAVAILABLE}
2024-12-11 11:16:15 DEBUG Attempt 1/5 failed
2024-12-11 11:16:16 DEBUG Attempt 2/5 to fetch block
2024-12-11 11:16:16 2024-12-11 19:16:16.353 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2024-12-11 11:16:16 2024-12-11 19:16:16.360 UTC 0002 INFO [cli.common] readBlock -> Received block: 0
2024-12-11 11:16:16 2024-12-11 19:16:16.360 UTC 0003 INFO [channelCmd] fetch -> Retrieving last config block: 0
2024-12-11 11:16:16 2024-12-11 19:16:16.361 UTC 0004 INFO [cli.common] readBlock -> Received block: 0
2024-12-11 11:16:16 INFO Successfully fetched block
2024-12-11 11:16:16 INFO /opt/bin/configtxlator proto_decode --type=common.Block --input=/opt/cello/net/config_block.pb --output=/opt/cello/net/config_block.json
2024-12-11 11:16:16 INFO jq .data.data[0].payload.data.config /opt/cello/net/config_block.json -> /opt/cello/net/config.json
2024-12-11 11:16:16 INFO jq '.channel_group.groups.Application.groups.Org1MSP.values += ... ' /opt/cello/net/config.json -> /opt/cello/net/modified_config.json
2024-12-11 11:16:16 INFO /opt/bin/configtxlator proto_encode --input=/opt/cello/net/config.json --type=common.Config --output=/opt/cello/net/config.pb
2024-12-11 11:16:16 INFO /opt/bin/configtxlator proto_encode --input=/opt/cello/net/modified_config.json --type=common.Config --output=/opt/cello/net/modified_config.pb
2024-12-11 11:16:16 INFO /opt/bin/configtxlator compute_update --original=/opt/cello/net/config.pb --updated=/opt/cello/net/modified_config.pb --channel_id=channel --output=/opt/cello/net/config_update.pb
2024-12-11 11:16:16 INFO /opt/bin/configtxlator proto_decode --type=common.ConfigUpdate --input=/opt/cello/net/config_update.pb --output=/opt/cello/net/config_update.json
2024-12-11 11:16:16 INFO echo 'payload ... ' | jq . > /opt/cello/net/config_update_in_envelope.json
2024-12-11 11:16:16 INFO /opt/bin/configtxlator proto_encode --input=/opt/cello/net/config_update_in_envelope.json --type=common.Envelope --output=/opt/cello/net/config_update_in_envelope.pb
2024-12-11 11:16:16 INFO /opt/bin/peer channel update -f /opt/cello/net/config_update_in_envelope.pb -c channel -o orderer.cello.com:7050 --ordererTLSHostnameOverride orderer.cello.com --tls --cafile /opt/cello/org1.cello.com/crypto-config/ordererOrganizations/cello.com/orderers/orderer.cello.com/msp/tlscacerts/tlsca.cello.com-cert.pem
2024-12-11 11:16:17 2024-12-11 19:16:17.124 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2024-12-11 11:16:17 2024-12-11 19:16:17.170 UTC 0002 INFO [channelCmd] update -> Successfully submitted channel update

@YoungHypo YoungHypo changed the title Implemented anchor node configuration Implemented anchor peer configuration Dec 11, 2024
@yeasy yeasy merged commit 8eef62e into hyperledger:main Dec 13, 2024
4 checks passed
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.

2 participants