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
Alexis Hernandez
0f5687c5b9
server: Add endpoint: "GET /blocks/:query/raw"
7 years ago
Alexis Hernandez
def051cf1e
server: Add getRawBlock method to XSNService
7 years ago
Alexis Hernandez
c600980e83
server: Add endpoint: "GET /transactions/:txid/raw"
7 years ago
Alexis Hernandez
4e96219d77
server: Add getRawTransaction method to XSNService
7 years ago
Alexis Hernandez
2f789bbf13
server: Fix non-exhaustive pattern matches
7 years ago
Alexis Hernandez
6c56330f74
server: Add TODO to a test that might not be stable
7 years ago
Alexis Hernandez
15d8d8992b
server: Update "GET /blocks/:query"
Allows to find a block by blockhash or by block height.
7 years ago
Alexis Hernandez
4bed8492c0
server: Add getBlockhash method to XSNService
7 years ago
Alexis Hernandez
6e6ed7abbe
server: Add "GET /masternodes/:ip"
7 years ago
Alexis Hernandez
e76def63cb
server: Add getMasternode method to the XSNService
7 years ago
Alexis Hernandez
4d61427f6d
server: Add debug log to detect corrupted balances
The idea is to detect how the balances table is being corrupted,
when the actual bug is fixed, this will be removed.
7 years ago
Alexis Hernandez
e9eb79b813
server: Hide 0 balances from the balances API
It is unnecessary to be listing 0 balances on the richest addresses.
7 years ago
Alexis Hernandez
a485037201
server: Remove the available field from the balances table
Due to a bug, maintaining this field consistent has been tricky,
now the field is dropped and we use an index over a function instead.
7 years ago
Alexis Hernandez
788da62ec0
server: Fix failing test on BlockEventsProcessorSpec
7 years ago
Alexis Hernandez
b4120e284b
server: Update the BlockEventsProcessor flow
When a block is processed, in case it can't be fully retrieved from the
rpc server, the block is ignored.
When a block is processed, if there is an existing block having the same
height, it will be replaced by the new one.
This is a part for fixing the bug #6
7 years ago
Alexis Hernandez
7b8d12e4ed
server: Add getBy height on BlockDataHandler
7 years ago
Alexis Hernandez
b4442b3d98
server: Update playsonify to 1.2.0
7 years ago
Alexis Hernandez
61c6649584
server: Add unique constraint to the blocks table
This also changes the upsert method to insert on the BlockDataHandler,
this is piece for fixing the bug #6
7 years ago
Alexis Hernandez
b5dc19ccdb
server: Update the logback config to rotate the log file daily
7 years ago
Alexis Hernandez
9fbe4f5abf
server: Update queue
7 years ago
Alexis Hernandez
7fdf67afb0
server: Delete block transactions on rechain events
This fixes a bug that corrupted the balances table because the
transactions related to a block weren't being deleted, hence, causing
wrong balances.
7 years ago
Alexis Hernandez
779ded1973
server: Add deleteBy blockhash method to TransactionPostgresDataHandler
7 years ago
Alexis Hernandez
547e9bb835
server: Update anorm to 2.6.1
7 years ago
Alexis Hernandez
27d0ff3762
server: Update play framework to 2.6.13
7 years ago
Alexis Hernandez
99d28d12e6
server: Fix parsing the lastSeen field on the masternode
7 years ago
Alexis Hernandez
da144b7205
server: Add endpoint "GET /masternodes"
7 years ago
Alexis Hernandez
acc4ddba2d
server: Add getMasternodes method to XSNService
7 years ago
Alexis Hernandez
c215cbe9dd
server: Add sbt-scoverage plugin
7 years ago
Alexis Hernandez
4ce253ab90
server: Use BackwardsSynchronizerTask on SQSSeederTask
7 years ago
Alexis Hernandez
b335ea1c34
server: Add BackwardsSynchronizerTask
7 years ago
Alexis Hernandez
1066058267
server: User TransactionService#getTransaction on FirstBlockSynchronizerTask
7 years ago
Alexis Hernandez
a43435c4c3
server: Move getTransaction method from BlockEventsProcessor to TransactionService
7 years ago