77ed4aa754
* Store eth tx index separately Closes: #1075 Solution: - run a optional indexer service - adapt the json-rpc to the more efficient query changelog changelog fix lint fix backward compatibility fix lint timeout better strconv fix linter fix package name add cli command to index old tx fix for loop indexer cmd don't have access to local rpc workaround exceed block gas limit situation add unit tests for indexer refactor polish the indexer module Update server/config/toml.go Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> improve comments share code between GetTxByEthHash and GetTxByIndex fix unit test Update server/indexer.go Co-authored-by: Freddy Caceres <facs95@gmail.com> * Apply suggestions from code review * test enable-indexer in integration test * fix go lint * address review suggestions * fix linter * address review suggestions - test indexer in backend unit test - add comments * fix build * fix test * service name Co-authored-by: Freddy Caceres <facs95@gmail.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
36 lines
1.2 KiB
Nix
36 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoApplication
|
|
, rev ? "dirty"
|
|
}:
|
|
let
|
|
version = "v0.17.1";
|
|
pname = "ethermintd";
|
|
tags = [ "netgo" ];
|
|
ldflags = lib.concatStringsSep "\n" ([
|
|
"-X github.com/cosmos/cosmos-sdk/version.Name=ethermint"
|
|
"-X github.com/cosmos/cosmos-sdk/version.AppName=${pname}"
|
|
"-X github.com/cosmos/cosmos-sdk/version.Version=${version}"
|
|
"-X github.com/cosmos/cosmos-sdk/version.BuildTags=${lib.concatStringsSep "," tags}"
|
|
"-X github.com/cosmos/cosmos-sdk/version.Commit=${rev}"
|
|
]);
|
|
in
|
|
buildGoApplication rec {
|
|
inherit pname version tags ldflags;
|
|
src = lib.sourceByRegex ./. [
|
|
"^(x|app|cmd|client|server|crypto|rpc|types|encoding|ethereum|indexer|testutil|version|go.mod|go.sum|gomod2nix.toml)($|/.*)"
|
|
"^tests(/.*[.]go)?$"
|
|
];
|
|
modules = ./gomod2nix.toml;
|
|
doCheck = false;
|
|
pwd = src; # needed to support replace
|
|
subPackages = [ "cmd/ethermintd" ];
|
|
CGO_ENABLED = "1";
|
|
|
|
meta = with lib; {
|
|
description = "Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of Tendermint Core consensus engine.";
|
|
homepage = "https://github.com/evmos/ethermint";
|
|
license = licenses.asl20;
|
|
mainProgram = "ethermintd";
|
|
};
|
|
}
|