5 dakika
GraphTally Guide
Learn about The Graph’s new payment system, GraphTally (previously Timeline Aggregation Protocol). This system provides fast, efficient microtransactions with minimized trust.
Genel Bakış
GraphTally is a drop-in replacement to the Scalar payment system currently in place. It provides the following key features:
- Mikro ödemelerin üstesinden etkili bir şekilde gelir.
- Zincir üstünde yapılan işlemler ve maliyetler için bir birleştirme katmanı ekler.
- Endeksleyicilerin makbuzlar ve ödemeler üzerinde kontrol sahibi olmasına olanak tanır, sorgular için garanti ödeme sağlar.
- Merkeziyetsiz, güven gerektirmeyen ağ geçitlerine olanak sağlar ve birden fazla gönderici olması durumunda
indexer-service
performansını artırır.
Ayrıntılar
GraphTally allows a sender to make multiple payments to a receiver, Receipts, which aggregates these payments into a single payment, a Receipt Aggregate Voucher, also known as a RAV. This aggregated payment can then be verified on the blockchain, reducing the number of transactions and simplifying the payment process.
Ağ geçidi her sorgu için size veritabanınızda saklanan bir signed receipt
(imzalı makbuz) gönderecektir. Daha sonra, bu sorgular bir tap-agent
tarafından bir istek aracılığıyla toplulaştırılacaktır. Sonrasında size bir RAV gönderilecek. RAV’ı, sonradan aldığınız yeni makbuzlarla birlikte göndererek güncelleyebilirsiniz. Bu yeni oluşan RAV’ın değeri önceki RAV’ın ve sonradan eklediğiniz makbuzların toplamı olacaktır.
RAV Ayrıntıları
-
RAV blokzincirine gönderilmeyi bekleyen paradır.
-
RAV, toplulaştırma işlemini sürdürmek için istekler göndermeye devam edecek ve toplulaştırılmamış makbuzların toplam değerinin
amount willing to lose
’u (kaybetmesi göze alınan tutarı) aşmamasını sağlayacaktır. -
Her bir RAV, akıllı sözleşmelerde yalnızca bir kez kullanılabilir, bu yüzden tahsis kapandıktan sonra gönderilir.
RAV’i Kullanma
tap-agent
ve indexer-agent
komutlarını çalıştırdığınız sürece, her şey otomatik olarak yürütülecektir. Aşağıda sürecin ayrıntılı bir açıklaması verilmiştir:
-
Bir Endeksleyici tahsisi kapatır.
-
<recently-closed-allocation-buffer>
dönemi boyuncatap-agent
, söz konusu tahsis için bekleyen tüm makbuzları alır ve bu makbuzları bir RAV içine toplulaştırma talebi oluştur. Bu talebilast
(son) olarak işaretler. -
indexer-agent
, tüm son RAV’leri alır ve blokzincirine kullanma talepleri gönderir, bu daredeem_at
değerini güncelleyecektir. -
<finality-time>
dönemi boyunca,indexer-agent
, blokzincirinin işlemi geri çeviren herhangi bir yeniden düzenleme (reorg) yaşayıp yaşamadığını izler.- Eğer işlem geri çevrildiyse, RAV tekrar blokzincire gönderilir. Eğer geri çevrilmediyse,
final
(nihai) olarak işaretlenir.
- Eğer işlem geri çevrildiyse, RAV tekrar blokzincire gönderilir. Eğer geri çevrilmediyse,
Blokzinciri Adresleri
Sözleşmeler
Sözleşme | Arbitrum Ana Ağı (42161) | Arbitrum Sepolia (421614) |
---|---|---|
TAP Doğrulayıcı | 0x33f9E93266ce0E108fc85DdE2f71dab555A0F05a | 0xfC24cE7a4428A6B89B52645243662A02BA734ECF |
AllocationIDTracker | 0x5B2F33d7Ca6Ec88f5586f2528f58c20843D9FE7c | 0xAaC28a10d707bbc6e02029f1bfDAEB5084b2aD11 |
Emanet (Escrow) | 0x8f477709eF277d4A880801D01A140a9CF88bA0d3 | 0x1e4dC4f9F95E102635D8F7ED71c5CdbFa20e2d02 |
Ağ Geçidi
Bileşen | Edge and Node Mainnet (Arbitrum Mainnet) | Edge and Node Testnet (Arbitrum Sepolia) |
---|---|---|
Gönderen | 0xDDE4cfFd3D9052A9cb618fC05a1Cd02be1f2F467 | 0xC3dDf37906724732FfD748057FEBe23379b0710D |
İmzalayıcılar (Signers) | 0xfF4B7A5EfD00Ff2EC3518D4F250A27e4c29A2211 | 0xFb142dE83E261e43a81e9ACEADd1c66A0DB121FE |
Toplulaştırıcı (Aggregator) | https://tap-aggregator.network.thegraph.com | https://tap-aggregator.testnet.thegraph.com |
Prerequisites
In addition to the typical requirements to run an indexer, you’ll need a tap-escrow-subgraph
endpoint to query updates. You can use The Graph Network to query or host yourself on your graph-node
.
- Graph TAP Arbitrum Sepolia Subgraph (for The Graph testnet)
- Graph TAP Arbitrum One Subgraph (for The Graph mainnet)
Note: indexer-agent
does not currently handle the indexing of this Subgraph like it does for the network Subgraph deployment. As a result, you have to index it manually.
Geçiş Kılavuzu
Yazılım sürümleri
Gerekli yazılım sürümü burada bulunabilir.
Adımlar
-
Endeksleyici Aracı
- Buradaki süreci takip edin.
- Give the new argument
--tap-subgraph-endpoint
to activate the new GraphTally codepaths and enable redeeming of RAVs.
-
Endeksleyici Hizmeti
- Mevcut yapılandırmanızı tamamen yeni Indexer Service rs (Endeksleyici Hizmeti) ile değiştirin. Konteyner imajını kullanmanız tavsiye edilir.
- Eski versiyonda olduğu gibi, Endeksleyici Hizmeti’ni yatay olarak kolayca ölçekleyebilirsiniz. Hala durumsuz (stateless) bir yapıya sahiptir.
-
TAP Aracı
- Her zaman TAP Aracı’nın tek bir örneğini çalıştırın. Konteyner imajını kullanmanız önerilir.
-
Endeksleyici Servisi’ni ve TAP Aracı’nı Yapılandırma
Yapılandırma,
indexer-service
vetap-agent
arasında paylaşılan bir TOML dosyasıdır ve--config /path/to/config.toml
argümanı ile sağlanır.Tam yapılandırmaya ve varsayılan değerlere göz atın.
Minimal yapılandırma için aşağıdaki şablonu kullanın:
1# You will have to change *all* the values below to match your setup.2#3# Some of the config below are global graph network values, which you can find here:4# <https://github.com/graphprotocol/indexer/tree/main/docs/networks>5#6# Pro tip: if you need to load some values from the environment into this config, you7# can overwrite with environment variables. For example, the following can be replaced8# by [PREFIX]_DATABASE_POSTGRESURL, where PREFIX can be `INDEXER_SERVICE` or `TAP_AGENT`:9#10# [database]11# postgres_url = "postgresql://indexer:${POSTGRES_PASSWORD}@postgres:5432/indexer_components_0"1213[indexer]14indexer_address = "0x1111111111111111111111111111111111111111"15operator_mnemonic = "celery smart tip orange scare van steel radio dragon joy alarm crane"1617[database]18# The URL of the Postgres database used for the indexer components. The same database19# that is used by the `indexer-agent`. It is expected that `indexer-agent` will create20# the necessary tables.21postgres_url = "postgres://postgres@postgres:5432/postgres"2223[graph_node]24# URL to your graph-node's query endpoint25query_url = "<http://graph-node:8000>"26# URL to your graph-node's status endpoint27status_url = "<http://graph-node:8000/graphql>"2829[subgraphs.network]30# Query URL for the Graph Network Subgraph.31query_url = "<http://example.com/network-subgraph>"32# Optional, deployment to look for in the local `graph-node`, if locally indexed.33# Locally indexing the Subgraph is recommended.34# NOTE: Use `query_url` or `deployment_id` only35deployment_id = "Qmaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"3637[subgraphs.escrow]38# Query URL for the Escrow Subgraph.39query_url = "<http://example.com/network-subgraph>"40# Optional, deployment to look for in the local `graph-node`, if locally indexed.41# Locally indexing the Subgraph is recommended.42# NOTE: Use `query_url` or `deployment_id` only43deployment_id = "Qmaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"4445[blockchain]46# The chain ID of the network that the graph network is running on47chain_id = 133748# Contract address of TAP's receipt aggregate voucher (RAV) verifier.49receipts_verifier_address = "0x2222222222222222222222222222222222222222"5051########################################52# Specific configurations to tap-agent #53########################################54[tap]55# This is the amount of fees you are willing to risk at any given time. For ex.56# if the sender stops supplying RAVs for long enough and the fees exceed this57# amount, the indexer-service will stop accepting queries from the sender58# until the fees are aggregated.59# NOTE: Use strings for decimal values to prevent rounding errors60# e.g:61# max_amount_willing_to_lose_grt = "0.1"62max_amount_willing_to_lose_grt = 206364[tap.sender_aggregator_endpoints]65# Key-Value of all senders and their aggregator endpoints66# This one below is for the E&N testnet gateway for example.670xDDE4cfFd3D9052A9cb618fC05a1Cd02be1f2F467 = "https://tap-aggregator.network.thegraph.com"
Notlar:
tap.sender_aggregator_endpoints
parametresinin alabileceği değerler ağ geçidi bölümü içinde bulunabilir.blockchain.receipts_verifier_address
parametresinin alabileceği değerler, Blokzinciri adresleri bölümü ile uyumlu olarak, uygun zincir kimliği verilerek kullanılmalıdır.
Kayıt Seviyesi
- Kayıt seviyesini
RUST_LOG
çevre değişkenini kullanarak ayarlayabilirsiniz. - Bunu
RUST_LOG=indexer_tap_agent=debug,info
şeklinde ayarlamanız önerilir.
İzleme
Metrikler
Tüm bileşenler, prometheus tarafından sorgulanmak üzere 7300 portunu açar.
Grafana Gösterge Paneli
Grafana Gösterge Paneli’ni indirip içe aktarabilirsiniz.
Launchpad
Halihazırda, indexer-rs
ve tap-agent
’in buradan ulaşabileceğiniz bir WIP sürümü (geliştirilmesi tamamlanmamış sürümü) bulunmaktadır.