The invention relates to a challenge
authentication mechanism-based verifiable on-chain
data query method, and belongs to the technical field of block chains. According to the method, the maintenance task of the
authentication data structure ADS is entrusted to a limited number of service providers from a full node, and the
correctness of the maintenance task is ensured by the full node through
verification instead of reconstructing the ADS. A
mechanism based on challenge
authentication is designed, and a
service provider extracts on-chain data, constructs an ADS and provides a query service; before a user queries, a challenge node constructs a challenge token containing a known result query expression and sends the challenge token to a
service provider, and after the
service provider issues a query result and a proof, the result
correctness and the proof validity are verified in a full-node manner, so that an
attack initiated by a wrong ADS can be detected at an extremely
high probability. According to the method, the ADS maintenance overhead is greatly reduced while the
correctness of the ADS is ensured, the validity of verifiable query is ensured, and the method has very strong robustness and very
high security for adaptive attacks, so that the diversity of query services is effectively expanded.