aws-solutions-library-samples / guidance-for-digital-assets-on-aws

Digital Assets Examples
MIT No Attribution
45 stars 12 forks source link

Corrected the field name for BTC transaction table in CF template #8

Closed irajan88 closed 9 months ago

irajan88 commented 10 months ago

Issue #, if available: https://github.com/aws-solutions-library-samples/guidance-for-digital-assets-on-aws/issues/7

Description of changes:

The below CF template contains the schema for the BTC transaction table. As per the template, the field "input" in the transaction table contains "spend_output_index".

guidance-for-digital-assets-on-aws/analytics/consumer/aws-public-blockchain.yaml

Line 181 in fd23105

Type: array<struct<index:bigint,spent_transaction_hash:string,spend_output_index:bigint,script_asm:string,script_hex:string,sequence:bigint,required_signatures:bigint,type:string,address:string,value:double>> When checking the source data in the S3 bucket, it can be seen that the name of the field is "spent_output_index" (not "spend_output_index").

S3 bucket URI for transaction table: s3://aws-public-blockchain/v1.0/btc/transactions/

It can also be verified in the below code section:

https://github.com/aws-solutions-library-samples/guidance-for-digital-assets-on-aws/blob/fd2310503135df6210c4134b50b8a2cccaf0d8e7/analytics/producer/copilot/bitcoin-worker/worker.py#L331C1-L333C32

I have verified the same by updating the template and testing in my AWS account. I am getting the desired result after updating the above mentioned line in the CloudFormation template.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.