Alexis Hernandez
7791646b60
server: Update README.md
7 years ago
Alexis Hernandez
6fd6db473b
server: Add the AMOUNT_TYPE domain to the evolution schema ( #35 )
7 years ago
Alexis Hernandez
b9a035e9aa
server: Support P2WPKH address format ( #33 )
7 years ago
Alexis Hernandez
a0f0df9946
server: Improve the evolution schema ( #35 )
Add a foreign key on the transaction_inputs table to ensure
that an output has been referenced only once.
7 years ago
Alexis Hernandez
cd5fadc472
server: Update "GET /addresses/:address/utxos" ( #34 )
Previously, the endpoint was retrieving the information from
the xsn service, now it is loaded from the database.
7 years ago
Alexis Hernandez
ee71562fb6
server: Add getUnspentOutputs method to the TransactionDataHandler ( #34 )
7 years ago
Alexis Hernandez
c594de3a14
server: Clean legacy code from TransactionDataHandler ( #34 )
7 years ago
Alexis Hernandez
ef0b7ba633
server: Mark output as spent while creating transactions ( #34 )
7 years ago
Alexis Hernandez
dee0f7e600
server: Update the database schema to support utxos ( #35 )
7 years ago
Alexis Hernandez
5cbf98caa0
server: Add foreign key to the next_blockhash ( #35 )
When the next block is deleted, the next_blockhash is
updated with a null value to avoid conflicts and improve
the database consistency.
7 years ago
Alexis Hernandez
28570f80f5
server: Remove legacy seeder tasks ( #38 )
The SQS seeder and the Poller seeder are removed, they weren't
adapted to the linear synchronization process and they are not
required anymore.
Also, all related classes and dependencies that where used by
these tasks were removed too.
7 years ago
Alexis Hernandez
d6a74dbb43
server: Add the PollerSynchronizerModule ( #38 )
This disables the SeederModule that uses SQS to sync the database.
7 years ago
Alexis Hernandez
db7059db63
server: Add the PollerSynchronizerTask ( #37 )
The task runs frequently polling the xsn service for its latest block,
then, it calls the LedgerSynchronizerService to ensure that block
gets into the ledger database.
7 years ago
Alexis Hernandez
03ed7a694b
server: Add the LedgerSynchronizerService ( #37 )
This is a simplified version of the BlockEventProcessor, it handles
the synchronization between the xsn and our ledger database, it also
takes care of a lot of corner cases to keep the synchronization process
flexible enough and linear.
7 years ago
Alexis Hernandez
d012bef430
server: Add the LedgerDataHandler ( #37 )
This is the initial piece for integrating the linear database
seeding.
7 years ago
Alexis Hernandez
9759bc4bb9
server: Complete fixing the tests after schema changes ( #35 )
It is very likely that this change has fixed #15 .
7 years ago
Alexis Hernandez
d338ff9fad
server: Add support for storing the genesis block ( #39 )
7 years ago
Alexis Hernandez
2eb9c010dd
server: Initial database redesign ( #35 )
- The evolutions compacted.
- Domain types created.
- Foreign keys added.
- Support for the P2WPKH address format added.
7 years ago
Alexis Hernandez
6ed2b5d31e
server: Update "GET /addresses/:address" ( #18 )
Now it retrieves the address balance from the database
instead of the xsn server, this reduces the data because
now we get the balance only and the transactions are retrieved
with another endpoint.
7 years ago
Alexis Hernandez
83bfd06645
server: Add getBy method to BalanceDataHandler ( #18 )
7 years ago
Alexis Hernandez
4355a0347f
server: Update the "GET /addresses/:address/transactions"
Now it returns the transaction values where the address was involved.
7 years ago
Alexis Hernandez
510b127d3c
server: Add support for ordering in "GET /addresses/:address/transactions"
7 years ago
Alexis Hernandez
c2ec7aedf3
server: Update BalanceField to use enumeratum
7 years ago
Alexis Hernandez
cca14b9104
server: Integrate enumeratum library
7 years ago
Alexis Hernandez
0d5e37b040
server: Improve the ColumnNameResolver
In order to get deterministic results while retrieving
paginated results, the getUniqueColumnName method has been
introduced, when sorting by a non-unique column, we'll break
ties using the unique column.
7 years ago
Alexis Hernandez
c410771ed4
server: Run the BackwardsSynchronizerTask after replacing a block by height ( #30 )
7 years ago
Alexis Hernandez
b32bc45d01
server: Test "GET /addresses/:address/transactions" endpoint
7 years ago
Alexis Hernandez
79f5e67878
server: Test getBy method on TransactionPostgresDataHandlerSpec
7 years ago
Alexis Hernandez
9d355650cf
server: Add endpoint "POST /transactions"
This is a part for #26 , it allows to push a hex-encoded
transaction to the network.
7 years ago
Alexis Hernandez
5313e76738
server: Add sendRawTransaction method to XSNService
This is a part for #26 .
7 years ago
Alexis Hernandez
5a7fd8a81d
server: Add endpoint "GET /addresses/:address/utxos"
This is a part for #23 , it allows to retrieve the unspent
outputs for the given address.
7 years ago
Alexis Hernandez
41abe0e741
server: Add getUnspentOutputs method to XSNService
This is a part for #23 .
7 years ago
Alexis Hernandez
c3632db349
server: Disable PollingSeederModule on tests
7 years ago
Alexis Hernandez
f1bf820b75
server: Add endpoint "GET /addresses/:address/transactions"
This is a piece for #18 , it allow us to retrieve the transactions
for the given address.
NOTE: This commit doesn't include tests in order to work in the frontend
concurrently, tests will be included before the release.
7 years ago
Alexis Hernandez
ef862b9272
server: Allow to retrieve transactions for an address on TransactionDataHandler
This is a piece for #18 , we need to retrieve paginated transactions for a given
address.
NOTE: This commit doesn't include tests in order to work in the frontend
concurrently, tests will be included before the release.
7 years ago
Alexis Hernandez
cf86eb3672
server: Add address index to transaction_inputs and transaction_outputs
This is useful to retrieve transactions by address from the database,
part of #18 .
7 years ago
Alexis Hernandez
b4ad16dd56
server: Create TransactionDataHandler trait
The trait is implemented by TransactionPostgresDataHandler and
TransactionPostgresDataHandler.
This is a piece for creating endpoints interacting with transactions
from the database instead of the xsn service.
7 years ago
Alexis Hernandez
5008c73326
server: Update README.md
7 years ago
Alexis Hernandez
d8c24f9057
server: Fixes #21 Add the PollingSeederModule
This is a replacement for the SQSSeederModule, instead
of requiring AWS SQS to sync the database, we poll the
latest block from the rpc server every minute.
As reuse most of the logic from the SQS seeding approach,
this could be a good replacement to remove the AWS
dependency, at the moment, the idea is to use this new
module locally.
7 years ago
Alexis Hernandez
032fac4378
server: Remove the FirstBlockSynchronizerTask
The same job can be done by the BackwardsSynchronizerTask, there is no
need to keep both.
7 years ago
Alexis Hernandez
3a8d3cb803
server: Use BlockOps on BlockEventsProcessor
7 years ago
Alexis Hernandez
faef6eadf7
server: Small fix to the BackwardsSynchronizerTask
When running the task, we replace a block when its height already exists,
this should help on the fix for #11 and #12 .
7 years ago
Alexis Hernandez
313afb5cde
server: Remove corrupted balance logs
As #5 has been closed because the balances tables hasn't
been corrupted again, the logs are unnecessary now.
7 years ago
Alexis Hernandez
f10e0ad452
server: Fix for #12 avoid corrupting the previous_blockhash
7 years ago
Alexis Hernandez
45ae0eeba2
server: Fix for #11 avoid corrupting the next_blockhash
7 years ago
Alexis Hernandez
0317a4d933
server: Refactor DatabaseSeeder and BlockEventsProcessor
7 years ago
Alexis Hernandez
339fab1176
server: Make blocktime and time fields non-mandatory in rpc transactions
Sometimes the rpc server returns transaction with the blocktime and time
fields missing.
7 years ago
Alexis Hernandez
5023d78679
server: Exclude burn address from total supply
7 years ago
Alexis Hernandez
9dd94f299b
server: Add retries to the SQSSeederTask
Don't stop consuming messages when the connection to SQS is lost,
instead, retry to connect.
7 years ago
Alexis Hernandez
5ff45a0921
server: Minor updates to the seeding process
7 years ago